Skip to content

Commit 0a8f519

Browse files
Merge branch 'staging' into copilot/sub-pr-7
2 parents 5d0c92c + 1d445d3 commit 0a8f519

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/test_routes.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
client = TestClient(app)
1111

1212

13+
<<<<<<< copilot/sub-pr-7
1314
def _mock_db_dependency(rows=None):
1415
"""Return a FastAPI dependency override that yields a mock DB connection."""
1516
if rows is None:
@@ -56,6 +57,17 @@ def test_root_returns_products_from_db() -> None:
5657
assert "Returned 1 products" in body["meta"]["message"]
5758
finally:
5859
app.dependency_overrides.clear()
60+
=======
61+
def test_root_returns_welcome_message() -> None:
62+
"""GET / should return a welcome message."""
63+
response = client.get("/")
64+
assert response.status_code == 200
65+
json_data = response.json()
66+
assert "meta" in json_data
67+
assert "data" in json_data
68+
assert "message" in json_data["meta"]
69+
assert "NX AI" in json_data["meta"]["message"]
70+
>>>>>>> staging
5971

6072

6173
def test_health_returns_ok() -> None:

0 commit comments

Comments
 (0)