mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
API in order to get the list of IOU, Dynamips, Qemu images
This commit is contained in:
1 parent
5a4ffae6a2
commit
bca90bc563
14 files changed
+218
-36
No files matched your search
@@ -36,11 +36,7 @@ def iou(port_manager):
|
||||
return iou
|
||||
|
||||
|
||||
def test_get_application_id(loop, project, port_manager):
|
||||
# Cleanup the IOU object
|
||||
IOU._instance = None
|
||||
iou = IOU.instance()
|
||||
iou.port_manager = port_manager
|
||||
def test_get_application_id(loop, project, iou):
|
||||
vm1_id = str(uuid.uuid4())
|
||||
vm2_id = str(uuid.uuid4())
|
||||
vm3_id = str(uuid.uuid4())
|
||||
@@ -54,11 +50,7 @@ def test_get_application_id(loop, project, port_manager):
|
||||
assert iou.get_application_id(vm3_id) == 1
|
||||
|
||||
|
||||
def test_get_application_id_multiple_project(loop, port_manager):
|
||||
# Cleanup the IOU object
|
||||
IOU._instance = None
|
||||
iou = IOU.instance()
|
||||
iou.port_manager = port_manager
|
||||
def test_get_application_id_multiple_project(loop, iou):
|
||||
vm1_id = str(uuid.uuid4())
|
||||
vm2_id = str(uuid.uuid4())
|
||||
vm3_id = str(uuid.uuid4())
|
||||
@@ -72,11 +64,7 @@ def test_get_application_id_multiple_project(loop, port_manager):
|
||||
assert iou.get_application_id(vm3_id) == 3
|
||||
|
||||
|
||||
def test_get_application_id_no_id_available(loop, project, port_manager):
|
||||
# Cleanup the IOU object
|
||||
IOU._instance = None
|
||||
iou = IOU.instance()
|
||||
iou.port_manager = port_manager
|
||||
def test_get_application_id_no_id_available(loop, project, iou):
|
||||
with pytest.raises(IOUError):
|
||||
for i in range(1, 513):
|
||||
vm_id = str(uuid.uuid4())
|
||||
|
||||
Reference in new issue
Block a user