Commit af7c5094 authored by Łukasz Nowak's avatar Łukasz Nowak

Simplify.

parent a6445624
...@@ -397,17 +397,15 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -397,17 +397,15 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
def _checkComputerPartitionSalePackingListState(self, state, def _checkComputerPartitionSalePackingListState(self, state,
resource, sequence): resource, sequence):
delivery_line_amount = sequence.get("delivery_line_amount", 1) delivery_line_amount = sequence.get("delivery_line_amount", 1)
computer_partition = self.portal.portal_catalog.getResultValue( self.assertEqual(delivery_line_amount, self.portal.portal_catalog\
uid=sequence['computer_partition_uid']) .countResults(
delivery_line_list = [q.getObject() for q in self.portal.portal_catalog(
default_aggregate_uid=ComplexQuery( default_aggregate_uid=ComplexQuery(
Query(default_aggregate_uid=computer_partition.getUid()), Query(default_aggregate_uid=sequence['computer_partition_uid']),
Query(default_aggregate_uid=sequence['software_instance_uid']), Query(default_aggregate_uid=sequence['software_instance_uid']),
operator="AND"), operator="AND"),
portal_type=self.sale_packing_list_line_portal_type, portal_type=self.sale_packing_list_line_portal_type,
simulation_state=state, simulation_state=state,
resource_relative_url=resource)] resource_relative_url=resource)[0][0])
self.assertEqual(delivery_line_amount, len(delivery_line_list))
def _checkComputerPartitionNoSalePackingList(self, resource, sequence): def _checkComputerPartitionNoSalePackingList(self, resource, sequence):
computer_partition = self.portal.portal_catalog.getResultValue( 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