mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-21 08:29:43 +00:00
Refactor tests and start work on database integration.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user