add testing to fastapi
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user