Spaces:
Running
Running
Download plugins/_a0_acp/tests/test_session.py from Leon4gr45/openoperator: direct link, hf CLI and curl.
- Browser
- Download file 565 Bytes
-
https://huggingface.co/spaces/Leon4gr45/openoperator/resolve/main/plugins/_a0_acp/tests/test_session.py
- Command line
-
hf download hf://spaces/Leon4gr45/openoperator/plugins/_a0_acp/tests/test_session.py
-
curl -L -o test_session.py https://huggingface.co/spaces/Leon4gr45/openoperator/resolve/main/plugins/_a0_acp/tests/test_session.py
565 Bytes
| from datetime import datetime, timezone | |
| from plugins._a0_acp.api.session import _session_payload | |
| class _Context: | |
| id = "ctx-acp" | |
| name = "ACP" | |
| created_at = datetime(2026, 8, 16, tzinfo=timezone.utc) | |
| last_message = datetime(2026, 8, 16, 12, 34, tzinfo=timezone.utc) | |
| def get_data(self, key: str): | |
| return {"acp_cwd": "/workspace", "acp_mode": "default"}.get(key) | |
| def test_session_payload_serializes_datetime_metadata() -> None: | |
| payload = _session_payload(_Context()) | |
| assert payload["updated_at"] == "2026-08-16T12:34:00+00:00" | |