import pytest from fastapi.testclient import TestClient @pytest.fixture def client(test_app): """Create a test client using the test app with in-memory dependencies.""" with TestClient(test_app) as client: yield client def test_root(client): response = client.get("/agent/api") assert response.status_code == 200 def test_health(client): response = client.get("/health") assert response.status_code == 200 def test_chat(client): response = client.post( "/chat", json={"messages": "Hello, how are you?"} ) assert response.status_code == 200 assert response.json() is not None