Spaces:
Sleeping
Sleeping
| # tests use the pytest 'client' fixture; no direct app import required | |
| def test_chat_source_handles_none_and_unsafe(client): | |
| # Test that chat_source returns 404 for unknown source and does not raise | |
| response = client.get("/chat/source/unknown_file.md") | |
| assert response.status_code in (200, 404) | |
| def test_chat_source_safe_logging(client): | |
| # Ensure requesting a known sample filename returns success and logger doesn't error | |
| response = client.get("/chat/source/remote_work_policy.md") | |
| data = response.get_json() | |
| assert data is not None | |
| assert data.get("status") in ("success", "error") | |