mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Upgrade dev dependencies and fix tests to support pytest-asyncio strict mode
This commit is contained in:
1 parent
2e91eac1eb
commit
86c44cd6e7
39 files changed
+100
-101
No files matched your search
@@ -18,6 +18,7 @@
|
||||
import os
|
||||
import uuid
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
from fastapi import FastAPI, status
|
||||
from httpx import AsyncClient
|
||||
@@ -29,7 +30,7 @@ from gns3server.controller.snapshot import Snapshot
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@pytest_asyncio.fixture
|
||||
async def project(app: FastAPI, client: AsyncClient, controller: Controller) -> Project:
|
||||
|
||||
u = str(uuid.uuid4())
|
||||
@@ -39,7 +40,7 @@ async def project(app: FastAPI, client: AsyncClient, controller: Controller) ->
|
||||
return project
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@pytest_asyncio.fixture
|
||||
async def snapshot(project: Project):
|
||||
|
||||
snapshot = await project.snapshot("test")
|
||||
|
||||
Reference in new issue
Block a user