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

Avoid divergency in tests.

Edit only hosting delivery, as this one does not come from simulation.
parent d348d245
...@@ -3454,16 +3454,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -3454,16 +3454,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer_partition_uid = sequence["computer_partition_uid"] computer_partition_uid = sequence["computer_partition_uid"]
computer_partition = self.portal.portal_catalog.getResultValue( computer_partition = self.portal.portal_catalog.getResultValue(
uid=computer_partition_uid) uid=computer_partition_uid)
hosting_date = DateTime() hosting_date = DateTime() - 1
setup_date = hosting_date + 1
for movement in computer_partition.getAggregateRelatedValueList( for movement in computer_partition.getAggregateRelatedValueList(
portal_type=self.sale_packing_list_line_portal_type): portal_type=self.sale_packing_list_line_portal_type):
if movement.getResource() == \ if movement.getResource() == \
movement.portal_preferences.getPreferredInstanceHostingResource(): movement.portal_preferences.getPreferredInstanceHostingResource():
movement.edit(start_date=hosting_date) movement.edit(start_date=hosting_date)
elif movement.getResource() == \
movement.portal_preferences.getPreferredInstanceSetupResource():
movement.edit(start_date=setup_date)
def stepCheckPackingListAmountTwoComputerPartition(self, sequence, **kw): def stepCheckPackingListAmountTwoComputerPartition(self, sequence, **kw):
computer_partition_uid = sequence["computer_partition_uid"] computer_partition_uid = sequence["computer_partition_uid"]
...@@ -3479,16 +3475,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -3479,16 +3475,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer_partition_uid = sequence["computer_partition_uid"] computer_partition_uid = sequence["computer_partition_uid"]
computer_partition = self.portal.portal_catalog.getResultValue( computer_partition = self.portal.portal_catalog.getResultValue(
uid=computer_partition_uid) uid=computer_partition_uid)
setup_date = DateTime() hosting_date = DateTime() + 1
hosting_date = setup_date + 1
for movement in computer_partition.getAggregateRelatedValueList( for movement in computer_partition.getAggregateRelatedValueList(
portal_type=self.sale_packing_list_line_portal_type): portal_type=self.sale_packing_list_line_portal_type):
if movement.getResource() == \ if movement.getResource() == \
movement.portal_preferences.getPreferredInstanceHostingResource(): movement.portal_preferences.getPreferredInstanceHostingResource():
movement.edit(start_date=hosting_date) movement.edit(start_date=hosting_date)
elif movement.getResource() == \
movement.portal_preferences.getPreferredInstanceSetupResource():
movement.edit(start_date=setup_date)
def stepSetPurchasePackingListLineSetupResource(self, sequence, **kw): def stepSetPurchasePackingListLineSetupResource(self, sequence, **kw):
""" """
...@@ -3508,16 +3500,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -3508,16 +3500,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer_partition_uid = sequence["computer_uid"] computer_partition_uid = sequence["computer_uid"]
computer_partition = self.portal.portal_catalog.getResultValue( computer_partition = self.portal.portal_catalog.getResultValue(
uid=computer_partition_uid) uid=computer_partition_uid)
hosting_date = DateTime() hosting_date = DateTime() - 1
setup_date = hosting_date + 1
service_uid = sequence['service_uid'] service_uid = sequence['service_uid']
for movement in computer_partition.getAggregateRelatedValueList( for movement in computer_partition.getAggregateRelatedValueList(
portal_type=self.purchase_packing_list_line_portal_type): portal_type=self.purchase_packing_list_line_portal_type):
if movement.getResourceUid() == service_uid: if movement.getResourceUid() == service_uid:
movement.edit(start_date=hosting_date) movement.edit(start_date=hosting_date)
elif movement.getResource() == \
movement.portal_preferences.getPreferredSoftwareSetupResource():
movement.edit(start_date=setup_date)
def stepSetAccountingAfterSetupStartDate(self, sequence, **kw): def stepSetAccountingAfterSetupStartDate(self, sequence, **kw):
""" """
...@@ -3526,16 +3514,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin): ...@@ -3526,16 +3514,12 @@ class TestVifibSlapWebServiceMixin(testVifibMixin):
computer_partition_uid = sequence["computer_uid"] computer_partition_uid = sequence["computer_uid"]
computer_partition = self.portal.portal_catalog.getResultValue( computer_partition = self.portal.portal_catalog.getResultValue(
uid=computer_partition_uid) uid=computer_partition_uid)
setup_date = DateTime() hosting_date = DateTime() + 1
hosting_date = setup_date + 1
service_uid = sequence['service_uid'] service_uid = sequence['service_uid']
for movement in computer_partition.getAggregateRelatedValueList( for movement in computer_partition.getAggregateRelatedValueList(
portal_type=self.sale_packing_list_line_portal_type): portal_type=self.sale_packing_list_line_portal_type):
if movement.getResourceUid() == service_uid: if movement.getResourceUid() == service_uid:
movement.edit(start_date=hosting_date) movement.edit(start_date=hosting_date)
elif movement.getResource() == \
movement.portal_preferences.getPreferredSoftwareSetupResource():
movement.edit(start_date=setup_date)
def _checkComputerPartitionAndRelatedSoftwareInstance(self, def _checkComputerPartitionAndRelatedSoftwareInstance(self,
computer_partition): computer_partition):
......
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