Inital commit

This commit is contained in:
2021-09-12 20:45:44 +12:00
commit 6ee4d38c06
12 changed files with 183 additions and 0 deletions

4
app/test/__init__.py Normal file
View File

@@ -0,0 +1,4 @@
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))

10
app/test/test_main.py Normal file
View File

@@ -0,0 +1,10 @@
from fastapi.testclient import TestClient
import app.main
client = TestClient(app.main.app)
def test_read_main():
response = client.get("/")
assert response.status_code == 200
assert response.json() == {"msg": "Hello World"}