deepfakeguard / tests /test_api.py
noorullah1102's picture
Initial commit
a869ab1
raw
history blame contribute delete
649 Bytes
import pytest
@pytest.mark.asyncio
async def test_health(client):
response = await client.get("/health")
assert response.status_code == 200
data = response.json()
assert data["status"] == "healthy"
assert "version" in data
assert "models_loaded" in data
@pytest.mark.asyncio
async def test_swagger_docs(client):
response = await client.get("/docs")
assert response.status_code == 200
@pytest.mark.asyncio
async def test_openapi_schema(client):
response = await client.get("/openapi.json")
assert response.status_code == 200
data = response.json()
assert data["info"]["title"] == "DeepFakeGuard"