Commit 7747b9d1 authored by Rafael Monnerat's avatar Rafael Monnerat

Extend Step to accept diferent expected amounts.

parent a2efdff5
...@@ -6073,7 +6073,8 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -6073,7 +6073,8 @@ class TestVifibSlapWebService(testVifibMixin):
self.assertEquals([], self.assertEquals([],
computer_partition.getInstanceParameterDict()["slave_instance_list"]) computer_partition.getInstanceParameterDict()["slave_instance_list"])
def stepCheckSlaveInstanceListFromOneComputerPartition(self, sequence): def stepCheckSlaveInstanceListFromOneComputerPartition(self, sequence,
expected_amount=1):
computer_guid = sequence["computer_reference"] computer_guid = sequence["computer_reference"]
partition_id = sequence["computer_partition_reference"] partition_id = sequence["computer_partition_reference"]
self.slap = slap.slap() self.slap = slap.slap()
...@@ -6084,10 +6085,14 @@ class TestVifibSlapWebService(testVifibMixin): ...@@ -6084,10 +6085,14 @@ class TestVifibSlapWebService(testVifibMixin):
self.assertEquals("RootSoftwareInstance", self.assertEquals("RootSoftwareInstance",
parameter_dict["slap_software_type"]) parameter_dict["slap_software_type"])
slave_instance_list = parameter_dict["slave_instance_list"] slave_instance_list = parameter_dict["slave_instance_list"]
self.assertEquals(1, len(slave_instance_list)) self.assertEquals(expected_amount, len(slave_instance_list))
slave_instance = slave_instance_list[0] for slave_instance in slave_instance_list:
self.assertEquals("SlaveInstance", slave_instance["slap_software_type"]) self.assertEquals("SlaveInstance", slave_instance["slap_software_type"])
def stepCheckTwoSlaveInstanceListFromOneComputerPartition(self, sequence):
self.stepCheckSlaveInstanceListFromOneComputerPartition(sequence,
expected_amount=2)
def stepCheckSlaveInstanceAccessUsingCurrentSoftwareInstanceUser(self, sequence): def stepCheckSlaveInstanceAccessUsingCurrentSoftwareInstanceUser(self, sequence):
slave_instance = self.portal.portal_catalog.getResultValue( slave_instance = self.portal.portal_catalog.getResultValue(
uid=sequence['software_instance_uid']) 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