Commit d2b85cc8 authored by Rafael Monnerat's avatar Rafael Monnerat

Added checks for some properties that was copied from order to packing list.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20930 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 606f6f3a
......@@ -202,7 +202,13 @@ class TestOrderMixin:
order.edit(source_value=organisation,
source_section_value=organisation,
destination_value=organisation,
destination_section_value=organisation)
destination_section_value=organisation,
# Added for test Packing List Copy
source_decision_value=organisation,
destination_decision_value=organisation,
source_administration_value=organisation,
destination_administration_value=organisation,
)
sequence.edit( order = order )
def stepCheckOrder(self, sequence=None, sequence_list=None, **kw):
......@@ -218,6 +224,7 @@ class TestOrderMixin:
self.assertEquals(organisation, order.getSourceSectionValue())
self.assertEquals(organisation, order.getDestinationSectionValue())
def stepCreateOrderLine(self,sequence=None, sequence_list=None, **kw):
"""
Create a empty order line
......
......@@ -58,7 +58,8 @@ class TestPackingListMixin(TestOrderMixin):
stepTic \
stepCheckOrderSimulation \
stepCheckDeliveryBuilding \
stepCheckPackingListIsNotDivergent '
stepCheckPackingListIsNotDivergent \
stepCheckOrderPackingList '
default_sequence_with_two_lines = '\
stepCreateOrganisation1 \
......@@ -82,7 +83,8 @@ class TestPackingListMixin(TestOrderMixin):
stepTic \
stepCheckOrderSimulation \
stepCheckDeliveryBuilding \
stepCheckPackingListIsNotDivergent '
stepCheckPackingListIsNotDivergent \
stepCheckOrderPackingList'
variated_default_sequence = '\
stepCreateOrganisation1 \
......@@ -103,7 +105,8 @@ class TestPackingListMixin(TestOrderMixin):
stepTic \
stepCheckOrderSimulation \
stepCheckDeliveryBuilding \
stepCheckPackingListIsNotDivergent '
stepCheckPackingListIsNotDivergent \
stepCheckOrderPackingList'
def getTitle(self):
return "Packing List"
......@@ -122,6 +125,26 @@ class TestPackingListMixin(TestOrderMixin):
"""
return 1
def stepCheckOrderPackingList(self, sequence=None, sequence_list=None, **kw):
"""
Test if packing list is matching order
"""
packing_list = sequence.get('packing_list')
order = sequence.get('order')
self.assertEquals(packing_list.getCausalityValue(), order)
self.assertEquals(packing_list.getSource(), order.getSource())
self.assertEquals(packing_list.getDestination(), order.getDestination())
self.assertEquals(packing_list.getDestinationSection(), \
order.getDestinationSection())
self.assertEquals(packing_list.getSourceSection(), \
order.getSourceSection())
self.assertEquals(packing_list.getSourceDecision(), \
order.getSourceDecision())
self.assertEquals(packing_list.getDestinationAdministration(), \
order.getDestinationAdministration())
self.assertEquals(packing_list.getSourceAdministration(), \
order.getSourceAdministration())
def stepCheckPackingListIsDivergent(self, sequence=None, sequence_list=None,
packing_list=None,**kw):
"""
......
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