Flash out API test suite
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
def test_root_returns_api_metadata(client):
|
||||
response = client.get("/")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json()["message"] == "Airfield PPR API"
|
||||
assert response.json()["docs"] == "/docs"
|
||||
|
||||
|
||||
def test_health_check_reports_database_connection(client):
|
||||
response = client.get("/health")
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.json()["status"] == "healthy"
|
||||
assert response.json()["database"] == "connected"
|
||||
Reference in New Issue
Block a user