API in order to get the list of IOU, Dynamips, Qemu images

This commit is contained in:
Julien Duponchelle committed 2015-04-16 18:32:12 +02:00
1 parent 5a4ffae6a2
commit bca90bc563
14 files changed
+218 -36

No files matched your search

+3 -15
View File
@@ -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())