Feat(API): PostgreSQL database setup

- Fix enviroment variables
- Fix the ping route for API
- Added database connection for future testing
This commit is contained in:
minhtrannhat
2022-12-14 21:35:00 -05:00
parent e9148a4428
commit 69debdb213
9 changed files with 198 additions and 59 deletions

View File

@@ -1,8 +1,7 @@
from quart import Response
from backend.run import app
from quart import Quart
async def test_control() -> None:
async def test_control(app: Quart) -> None:
test_client = app.test_client()
response: Response = await test_client.get("/control/ping")
response = await test_client.get("/control/ping/")
assert (await response.get_json())["ping"] == "pong"