Adding first test
parent
4a74c8ebb7
commit
fe6cb532d1
@ -0,0 +1,11 @@
|
|||||||
|
from app.main import app
|
||||||
|
from starlette.testclient import TestClient
|
||||||
|
|
||||||
|
client = TestClient(app)
|
||||||
|
|
||||||
|
|
||||||
|
def test_read_main():
|
||||||
|
response = client.get('/ping')
|
||||||
|
assert response.status_code == 200
|
||||||
|
data = response.json()
|
||||||
|
assert "pong" in data['ping']
|
Loading…
Reference in New Issue