Commit 6a5f9033 authored by Gabriel Monnerat's avatar Gabriel Monnerat

refactor code to be possible change the quantity. This will be used to test...

refactor code to be possible change the quantity. This will be used to test Slave Instances, because in some cases exists Sale Packing Lists with the same resource and state.
parent fbcee845
......@@ -217,6 +217,7 @@ class TestVifibSlapWebService(testVifibMixin):
def _checkComputerPartitionSalePackingListState(self, state,
resource, sequence):
delivery_line_amount = sequence.get("delivery_line_amount", 1)
computer_partition = self.portal.portal_catalog.getResultValue(
uid=sequence['computer_partition_uid'])
delivery_line_list = [q for q in computer_partition
......@@ -224,7 +225,7 @@ class TestVifibSlapWebService(testVifibMixin):
portal_type=self.sale_packing_list_line_portal_type)
if q.getResource() == resource
and q.getSimulationState() == state]
self.assertEqual(1, len(delivery_line_list))
self.assertEqual(delivery_line_amount, len(delivery_line_list))
def _checkComputerPartitionNoSalePackingList(self, resource, sequence):
computer_partition = self.portal.portal_catalog.getResultValue(
......
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