Started work on testing
This commit is contained in:
parent
7c08a285a9
commit
7598acddf9
2 changed files with 10 additions and 0 deletions
0
__init__.py
Normal file
0
__init__.py
Normal file
10
test_main.py
Normal file
10
test_main.py
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
from fastapi.testclient import TestClient
|
||||||
|
|
||||||
|
from .main import app
|
||||||
|
|
||||||
|
client = TestClient(app)
|
||||||
|
|
||||||
|
def test_read_main():
|
||||||
|
response = client.get("/")
|
||||||
|
assert response.status_code == 200
|
||||||
|
assert response.json() == {"Hello": "World"}
|
||||||
Loading…
Reference in a new issue