Commit baf98a26 authored by Sebastien Robin's avatar Sebastien Robin

added more steps for invoices


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6180 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b19422f3
...@@ -430,14 +430,25 @@ class TestPackingListMixin(TestOrderMixin): ...@@ -430,14 +430,25 @@ class TestPackingListMixin(TestOrderMixin):
# self.assertNotEquals(new_packing_list.getUid(),packing_list.getUid()) # self.assertNotEquals(new_packing_list.getUid(),packing_list.getUid())
self.assertEquals(len(delivery_value_list),len(resource_list)) self.assertEquals(len(delivery_value_list),len(resource_list))
def stepAddPackingListContainer(self,sequence=None, sequence_list=None, **kw): def stepAddPackingListContainer(self,sequence=None,
packing_list=None,sequence_list=None, **kw):
""" """
Check if simulation movement are disconnected Check if simulation movement are disconnected
""" """
if packing_list is None:
packing_list = sequence.get('packing_list') packing_list = sequence.get('packing_list')
container = packing_list.newContent(portal_type=self.container_type) container = packing_list.newContent(portal_type=self.container_type)
sequence.edit(container=container) sequence.edit(container=container)
def stepDefineNewPackingListContainer(self,sequence=None, sequence_list=None, **kw):
"""
Check if simulation movement are disconnected
"""
packing_list = sequence.get('new_packing_list')
self.stepAddPackingListContainer(sequence=sequence,packing_list=packing_list)
self.stepAddPackingListContainerLine(sequence=sequence)
self.stepSetContainerLineFullQuantity(quantity=1,sequence=sequence)
def stepAddPackingListContainerLine(self,sequence=None, sequence_list=None, **kw): def stepAddPackingListContainerLine(self,sequence=None, sequence_list=None, **kw):
""" """
Check if simulation movement are disconnected Check if simulation movement are disconnected
...@@ -455,12 +466,15 @@ class TestPackingListMixin(TestOrderMixin): ...@@ -455,12 +466,15 @@ class TestPackingListMixin(TestOrderMixin):
container_line = sequence.get('container_line') container_line = sequence.get('container_line')
container_line.edit(quantity=self.default_quantity-1) container_line.edit(quantity=self.default_quantity-1)
def stepSetContainerLineFullQuantity(self,sequence=None, sequence_list=None, **kw): def stepSetContainerLineFullQuantity(self,sequence=None, sequence_list=None,
quantity=None,**kw):
""" """
Check if simulation movement are disconnected Check if simulation movement are disconnected
""" """
container_line = sequence.get('container_line') container_line = sequence.get('container_line')
container_line.edit(quantity=self.default_quantity) if quantity is None:
quantity = sequence.get('line_quantity',self.default_quantity)
container_line.edit(quantity=quantity)
container_line.immediateReindexObject() container_line.immediateReindexObject()
def stepCheckPackingListIsNotPacked(self,sequence=None, sequence_list=None, **kw): def stepCheckPackingListIsNotPacked(self,sequence=None, sequence_list=None, **kw):
...@@ -472,16 +486,27 @@ class TestPackingListMixin(TestOrderMixin): ...@@ -472,16 +486,27 @@ class TestPackingListMixin(TestOrderMixin):
self.assertEquals(0,packing_list.isPacked()) self.assertEquals(0,packing_list.isPacked())
self.assertEquals('missing',packing_list.getContainerState()) self.assertEquals('missing',packing_list.getContainerState())
def stepCheckPackingListIsPacked(self,sequence=None, sequence_list=None, **kw): def stepCheckPackingListIsPacked(self,sequence=None, sequence_list=None,
packing_list=None,**kw):
""" """
Check that the number of objects in containers are Check that the number of objects in containers are
equals to the quantity of the packing list equals to the quantity of the packing list
""" """
if packing_list is None:
packing_list = sequence.get('packing_list') packing_list = sequence.get('packing_list')
get_transaction().commit() get_transaction().commit()
self.assertEquals(1,packing_list.isPacked()) self.assertEquals(1,packing_list.isPacked())
self.assertEquals('packed',packing_list.getContainerState()) self.assertEquals('packed',packing_list.getContainerState())
def stepCheckNewPackingListIsPacked(self,sequence=None, sequence_list=None, **kw):
"""
Check that the number of objects in containers are
equals to the quantity of the packing list
"""
packing_list = sequence.get('new_packing_list')
self.stepCheckPackingListIsPacked(sequence=sequence,
packing_list=packing_list)
def stepCommit(self, sequence=None, sequence_list=None, **kw): def stepCommit(self, sequence=None, sequence_list=None, **kw):
""" """
Commit transaction Commit transaction
......
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