Refactor tests and start work on database integration.

This commit is contained in:
grossmj committed 2020-12-02 18:39:08 +10:30
1 parent ae55c0ec9c
commit bf7cf862af
69 files changed
+2955 -1877

No files matched your search

@@ -17,10 +17,14 @@
import pytest
from fastapi import FastAPI, status
from httpx import AsyncClient
@pytest.mark.asyncio
async def test_appliances_list(controller_api):
pytestmark = pytest.mark.asyncio
response = await controller_api.get("/appliances/")
assert response.status_code == 200
assert len(response.json) > 0
async def test_appliances_list(app: FastAPI, client: AsyncClient) -> None:
response = await client.get(app.url_path_for("get_appliances"))
assert response.status_code == status.HTTP_200_OK
assert len(response.json()) > 0