mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Remove event_loop
This commit is contained in:
27 files changed
+46
-46
No files matched your search
@@ -55,7 +55,7 @@ async def test_start(gns3vm, controller):
|
||||
assert gns3vm.password == "world"
|
||||
|
||||
|
||||
async def test_start_invalid_vm(event_loop, gns3vm, controller):
|
||||
async def test_start_invalid_vm(gns3vm, controller):
|
||||
|
||||
await controller.add_compute("r1",
|
||||
name="R1",
|
||||
|
||||
@@ -25,7 +25,7 @@ from gns3server.controller.gns3vm.virtualbox_gns3_vm import VirtualBoxGNS3VM
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def gns3vm(event_loop, controller):
|
||||
async def gns3vm(controller):
|
||||
|
||||
vm = VirtualBoxGNS3VM(controller)
|
||||
vm.vmname = "GNS3 VM"
|
||||
|
||||
@@ -21,7 +21,7 @@ from gns3server.controller.gns3vm.vmware_gns3_vm import VMwareGNS3VM
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def gns3vm(event_loop, controller):
|
||||
async def gns3vm(controller):
|
||||
|
||||
vm = VMwareGNS3VM(controller)
|
||||
vm.vmname = "GNS3 VM"
|
||||
|
||||
@@ -33,7 +33,7 @@ from gns3server.utils.asyncio import aiozipstream
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def project(event_loop, controller):
|
||||
async def project(controller):
|
||||
|
||||
p = Project(controller=controller, name="test")
|
||||
p.dump = MagicMock()
|
||||
|
||||
@@ -47,7 +47,7 @@ def dummy_gns3vm(controller, dummy_engine):
|
||||
return vm
|
||||
|
||||
|
||||
async def test_list(event_loop, controller):
|
||||
async def test_list(controller):
|
||||
|
||||
vm = GNS3VM(controller)
|
||||
with asyncio_patch("gns3server.controller.gns3vm.vmware_gns3_vm.VMwareGNS3VM.list", return_value=[{"vmname": "test", "vmx_path": "test"}]):
|
||||
@@ -60,14 +60,14 @@ async def test_list(event_loop, controller):
|
||||
await vm.list("hyperv")
|
||||
|
||||
|
||||
async def test_json(event_loop, controller):
|
||||
async def test_json(controller):
|
||||
|
||||
vm = GNS3VM(controller)
|
||||
assert vm.__json__() == vm._settings
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not working well on Windows")
|
||||
async def test_update_settings(event_loop, controller):
|
||||
async def test_update_settings(controller):
|
||||
|
||||
vm = GNS3VM(controller)
|
||||
vm.settings = {
|
||||
|
||||
@@ -166,7 +166,7 @@ async def test_import_with_images(tmpdir, controller):
|
||||
assert os.path.exists(path), path
|
||||
|
||||
|
||||
async def test_import_iou_linux_no_vm(event_loop, linux_platform, tmpdir, controller):
|
||||
async def test_import_iou_linux_no_vm(linux_platform, tmpdir, controller):
|
||||
"""
|
||||
On non linux host IOU should be local if we don't have a GNS3 VM
|
||||
"""
|
||||
@@ -210,7 +210,7 @@ async def test_import_iou_linux_no_vm(event_loop, linux_platform, tmpdir, contro
|
||||
assert topo["topology"]["nodes"][0]["compute_id"] == "local"
|
||||
|
||||
|
||||
async def test_import_iou_linux_with_vm(event_loop, linux_platform, tmpdir, controller):
|
||||
async def test_import_iou_linux_with_vm(linux_platform, tmpdir, controller):
|
||||
"""
|
||||
On non linux host IOU should be vm if we have a GNS3 VM configured
|
||||
"""
|
||||
@@ -255,7 +255,7 @@ async def test_import_iou_linux_with_vm(event_loop, linux_platform, tmpdir, cont
|
||||
assert topo["topology"]["nodes"][0]["compute_id"] == "vm"
|
||||
|
||||
|
||||
async def test_import_nat_non_linux(event_loop, windows_platform, tmpdir, controller):
|
||||
async def test_import_nat_non_linux(windows_platform, tmpdir, controller):
|
||||
"""
|
||||
On non linux host NAT should be moved to the GNS3 VM
|
||||
"""
|
||||
@@ -300,7 +300,7 @@ async def test_import_nat_non_linux(event_loop, windows_platform, tmpdir, contro
|
||||
assert topo["topology"]["nodes"][0]["compute_id"] == "vm"
|
||||
|
||||
|
||||
async def test_import_iou_non_linux(event_loop, windows_platform, tmpdir, controller):
|
||||
async def test_import_iou_non_linux(windows_platform, tmpdir, controller):
|
||||
"""
|
||||
On non linux host IOU should be moved to the GNS3 VM
|
||||
"""
|
||||
@@ -356,7 +356,7 @@ async def test_import_iou_non_linux(event_loop, windows_platform, tmpdir, contro
|
||||
mock.assert_called_with(controller._computes["vm"], project_id, project.path, os.path.join('project-files', 'iou', topo["topology"]["nodes"][0]['node_id']))
|
||||
|
||||
|
||||
async def test_import_node_id(event_loop, linux_platform, tmpdir, controller):
|
||||
async def test_import_node_id(linux_platform, tmpdir, controller):
|
||||
"""
|
||||
When importing a node, node_id should change
|
||||
"""
|
||||
@@ -449,7 +449,7 @@ async def test_import_node_id(event_loop, linux_platform, tmpdir, controller):
|
||||
assert os.path.exists(os.path.join(project.path, "project-files", "iou", topo["topology"]["nodes"][0]["node_id"], "startup.cfg"))
|
||||
|
||||
|
||||
async def test_import_keep_compute_id(event_loop, windows_platform, tmpdir, controller):
|
||||
async def test_import_keep_compute_id(windows_platform, tmpdir, controller):
|
||||
"""
|
||||
On linux host IOU should be moved to the GNS3 VM
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user