Commit 5d7a70ab authored by Łukasz Nowak's avatar Łukasz Nowak

Update test.

Previous sequence setups "current sale packing list" so precisely select
delivery on which deliver action shall happen.
parent 4319b3f3
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.tests.backportUnittest import skip
import transaction
......@@ -225,6 +226,19 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def stepDeliverInstanceSetupSalePackingList(self, sequence, **kw):
delivery = self.portal.portal_catalog.getResultValue(
default_aggregate_uid=ComplexQuery(
Query(default_aggregate_uid=sequence['computer_partition_uid']),
Query(default_aggregate_uid=sequence['software_instance_uid']),
operator="AND"),
portal_type=self.sale_packing_list_line_portal_type,
simulation_state='stopped',
resource_relative_url=self.portal.portal_preferences\
.getPreferredInstanceSetupResource()
).getParentValue()
self.portal.portal_workflow.doActionFor(delivery, 'deliver_action')
def test_Computer_getComputerPartitionList_SetupResource_DeliveredState(self):
"""
Check that calling Computer.getComputerPartitionList works in
......@@ -236,7 +250,7 @@ class TestVifibSlapComputerGetComputerPartitionList(TestVifibSlapWebServiceMixin
CleanTic \
\
LoginDefaultUser \
DeliverSalePackingList \
DeliverInstanceSetupSalePackingList \
Tic \
CheckComputerPartitionInstanceSetupSalePackingListDelivered \
SelectCurrentlyUsedSalePackingListUid \
......
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