mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-19 04:47:54 +00:00
Fix tests
This commit is contained in:
parent
c07b8c746e
commit
aa40e6097e
@ -97,7 +97,7 @@ def server(request, loop, port_manager, monkeypatch):
|
||||
return Query(loop, host=host, port=port)
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
@pytest.fixture(scope="function")
|
||||
def project():
|
||||
"""A GNS3 lab"""
|
||||
|
||||
|
@ -19,7 +19,7 @@ import pytest
|
||||
from tests.utils import asyncio_patch
|
||||
|
||||
|
||||
@pytest.yield_fixture(scope="module")
|
||||
@pytest.yield_fixture(scope="function")
|
||||
def vm(server, project, monkeypatch):
|
||||
|
||||
vboxmanage_path = "/fake/VboxManage"
|
||||
|
@ -21,7 +21,7 @@ from tests.utils import asyncio_patch
|
||||
from unittest.mock import patch
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
@pytest.fixture(scope="function")
|
||||
def vm(server, project):
|
||||
response = server.post("/projects/{project_id}/vpcs/vms".format(project_id=project.id), {"name": "PC TEST 1"})
|
||||
assert response.status == 201
|
||||
|
@ -305,4 +305,4 @@ def test_stop_capture(vm, tmpdir, manager, free_console_port, loop):
|
||||
|
||||
def test_get_legacy_vm_workdir():
|
||||
|
||||
assert IOU.get_legacy_vm_workdir(42) == "iou/device-42"
|
||||
assert IOU.get_legacy_vm_workdir(42, "bla") == "iou/device-42"
|
||||
|
@ -50,4 +50,4 @@ def test_binary_list(loop):
|
||||
|
||||
def test_get_legacy_vm_workdir():
|
||||
|
||||
assert Qemu.get_legacy_vm_workdir(42) == "qemu/vm-42"
|
||||
assert Qemu.get_legacy_vm_workdir(42, "bla") == "qemu/vm-42"
|
||||
|
Loading…
Reference in New Issue
Block a user