Commit 7d07e56d authored by Gabriel Monnerat's avatar Gabriel Monnerat

add new step to...

add new step to test_Person_request_SlaveInstance_Two_Different_SoftwareInstance. add new step to test_Person_request_SlaveInstance_Two_Different_SoftwareInstance. This step is to check if the slave instance and software instance with the same software release are allocated to the same computer partition
parent ae1dca32
......@@ -4335,6 +4335,7 @@ class TestVifibSlapWebService(testVifibMixin):
ConfirmOrderedSaleOrderActiveSense
Tic
CheckSlaveInstanceReady
CheckSlaveInstanceAllocationWithTwoDifferentSoftwareInstance
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
......@@ -5329,6 +5330,24 @@ class TestVifibSlapWebService(testVifibMixin):
self.assertNotEquals(sale_packing_list_line.getAggregateValue(
portal_type="Computer Partition"), None)
def stepCheckSlaveInstanceAllocationWithTwoDifferentSoftwareInstance(self, sequence):
slave_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
self.assertEquals("Slave Instance", slave_instance.getPortalType())
sale_packing_list_line = slave_instance.getAggregateRelatedValue(
portal_type="Sale Packing List Line")
software_release = sale_packing_list_line.getAggregateValue(
portal_type="Software Release")
sale_packing_list_line_list = software_release.aggregateRelatedValues(
portal_type="Sale Packing List Line")
computer_partition_list = [obj.getAggregateValue(portal_type="Computer Partition") \
for obj in sale_packing_list_line_list]
self.assertEquals(computer_partition_list[0],
computer_partition_list[1])
self.assertEquals(computer_partition_list[0].getReference(),
computer_partition_list[1].getReference())
self.assertEquals(2, len(computer_partition_list))
def stepCheckSlaveInstanceNotReady(self, sequence):
slave_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment