Upgrade dev dependencies and fix issues after upgrading to pytest-aiohttp v1.0.4

This commit is contained in:
grossmj committed 2022-08-27 19:16:02 +02:00
1 parent 9e5ca50302
commit d1c8f33fc5
40 files changed
+108 -89

No files matched your search

+2 -1
View File
@@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import pytest
import pytest_asyncio
import sys
import uuid
@@ -52,7 +53,7 @@ def base_params():
# Docker._instance = None
@pytest.fixture
@pytest_asyncio.fixture
async def vm(compute_api, compute_project, base_params):
with asyncio_patch("gns3server.compute.docker.Docker.list_images", return_value=[{"image": "nginx"}]):
+2 -1
View File
@@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import pytest
import pytest_asyncio
import os
import stat
import sys
@@ -45,7 +46,7 @@ def base_params(tmpdir, fake_iou_bin):
return {"application_id": 42, "name": "PC TEST 1", "path": "iou.bin"}
@pytest.fixture
@pytest_asyncio.fixture
async def vm(compute_api, compute_project, base_params):
response = await compute_api.post("/projects/{project_id}/iou/nodes".format(project_id=compute_project.id), base_params)
+2 -1
View File
@@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import pytest
import pytest_asyncio
import uuid
import os
import sys
@@ -57,7 +58,7 @@ def base_params(tmpdir, fake_qemu_bin):
return {"name": "PC TEST 1", "qemu_path": fake_qemu_bin}
@pytest.fixture
@pytest_asyncio.fixture
async def vm(compute_api, compute_project, base_params):
response = await compute_api.post("/projects/{project_id}/qemu/nodes".format(project_id=compute_project.id), base_params)
+2 -2
View File
@@ -15,13 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import pytest
import pytest_asyncio
import uuid
from tests.utils import asyncio_patch
from unittest.mock import patch
@pytest.fixture
@pytest_asyncio.fixture
async def vm(compute_api, compute_project):
params = {"name": "PC TEST 1"}
+2 -2
View File
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import pytest
import pytest_asyncio
from unittest.mock import patch, MagicMock
from tests.utils import asyncio_patch, AsyncioMagicMock
@@ -24,7 +24,7 @@ from gns3server.controller.ports.ethernet_port import EthernetPort
from gns3server.controller.link import Link, FILTERS
@pytest.fixture
@pytest_asyncio.fixture
async def nodes(compute, project):
response = MagicMock()
@@ -18,6 +18,7 @@
import uuid
import os
import pytest
import pytest_asyncio
import zipfile
import json
@@ -25,7 +26,7 @@ from unittest.mock import patch, MagicMock
from tests.utils import asyncio_patch
@pytest.fixture
@pytest_asyncio.fixture
async def project(controller_api, controller):
u = str(uuid.uuid4())
@@ -17,10 +17,10 @@
import os
import uuid
import pytest
import pytest_asyncio
@pytest.fixture
@pytest_asyncio.fixture
async def project(controller_api, controller):
u = str(uuid.uuid4())
@@ -30,7 +30,7 @@ async def project(controller_api, controller):
return project
@pytest.fixture
@pytest_asyncio.fixture
async def snapshot(project):
snapshot = await project.snapshot("test")