add testing to fastapi

This commit is contained in:
Thomas Peetz
2025-04-17 02:21:14 +02:00
parent 4a61d6a727
commit a6eeea6c1f
11 changed files with 156 additions and 14 deletions
View File
+10
View File
@@ -0,0 +1,10 @@
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_get_authors():
response = client.get("/comic/artists")
assert response.status_code == 200
assert len(response.json()) == 5