mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
1 parent
d657f94c18
commit
e37392c482
4 files changed
+12
-15
No files matched your search
@@ -37,8 +37,9 @@ def manager(port_manager):
|
||||
|
||||
|
||||
@pytest.fixture(scope="function")
|
||||
def vm(project, manager):
|
||||
return VPCSVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", project, manager)
|
||||
def vm(project, manager, loop):
|
||||
vm = manager.create_vm("test", project.id, "00010203-0405-0607-0809-0a0b0c0d0e0f")
|
||||
return loop.run_until_complete(asyncio.async(vm))
|
||||
|
||||
|
||||
def test_affect_uuid():
|
||||
@@ -180,11 +181,8 @@ def test_project_add_vm(manager):
|
||||
assert len(project.vms) == 1
|
||||
|
||||
|
||||
def test_project_close(loop, manager):
|
||||
project = Project()
|
||||
vm = VPCSVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", project, manager)
|
||||
project.add_vm(vm)
|
||||
vm.manager._vms = {vm.id: vm}
|
||||
def test_project_close(loop, vm, project):
|
||||
|
||||
with asyncio_patch("gns3server.modules.vpcs.vpcs_vm.VPCSVM.close") as mock:
|
||||
loop.run_until_complete(asyncio.async(project.close()))
|
||||
assert mock.called
|
||||
|
||||
Reference in new issue
Block a user