Commit 123a32d8 authored by Alexandre Boeglin's avatar Alexandre Boeglin

- Fixed existing tests in testInvoice.py

- Added helpers to testPackingList.py
- Removed wrong docstrings


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7277 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f492ee34
This diff is collapsed.
...@@ -82,13 +82,13 @@ class TestOrderMixin: ...@@ -82,13 +82,13 @@ class TestOrderMixin:
""" """
return ('erp5_base','erp5_pdm', 'erp5_trade', 'erp5_apparel',) return ('erp5_base','erp5_pdm', 'erp5_trade', 'erp5_apparel',)
def login(self, quiet=0, run=run_all_test): def login(self, quiet=0, run=1):
uf = self.getPortal().acl_users uf = self.getPortal().acl_users
uf._doAddUser('rc', '', ['Manager', 'Member'], []) uf._doAddUser('rc', '', ['Manager', 'Member'], [])
user = uf.getUserById('rc').__of__(uf) user = uf.getUserById('rc').__of__(uf)
newSecurityManager(None, user) newSecurityManager(None, user)
def afterSetUp(self, quiet=1, run=run_all_test): def afterSetUp(self, quiet=1, run=1):
self.login() self.login()
portal = self.getPortal() portal = self.getPortal()
self.category_tool = self.getCategoryTool() self.category_tool = self.getCategoryTool()
......
...@@ -312,7 +312,7 @@ class TestPackingListMixin(TestOrderMixin): ...@@ -312,7 +312,7 @@ class TestPackingListMixin(TestOrderMixin):
def stepCheckSimulationDestinationUpdated(self,sequence=None, sequence_list=None, **kw): def stepCheckSimulationDestinationUpdated(self,sequence=None, sequence_list=None, **kw):
""" """
Create a empty organisation XXX
""" """
applied_rule = sequence.get('applied_rule') applied_rule = sequence.get('applied_rule')
simulation_line_list = applied_rule.objectValues() simulation_line_list = applied_rule.objectValues()
...@@ -323,14 +323,14 @@ class TestPackingListMixin(TestOrderMixin): ...@@ -323,14 +323,14 @@ class TestPackingListMixin(TestOrderMixin):
def stepChangePackingListStartDate(self, sequence=None, sequence_list=None, **kw): def stepChangePackingListStartDate(self, sequence=None, sequence_list=None, **kw):
""" """
Test if packing list is divergent XXX
""" """
packing_list = sequence.get('packing_list') packing_list = sequence.get('packing_list')
packing_list.edit(start_date=self.datetime + 15) packing_list.edit(start_date=self.datetime + 15)
def stepCheckSimulationStartDateUpdated(self,sequence=None, sequence_list=None, **kw): def stepCheckSimulationStartDateUpdated(self,sequence=None, sequence_list=None, **kw):
""" """
Create a empty organisation XXX
""" """
applied_rule = sequence.get('applied_rule') applied_rule = sequence.get('applied_rule')
simulation_line_list = applied_rule.objectValues() simulation_line_list = applied_rule.objectValues()
...@@ -338,14 +338,34 @@ class TestPackingListMixin(TestOrderMixin): ...@@ -338,14 +338,34 @@ class TestPackingListMixin(TestOrderMixin):
for simulation_line in simulation_line_list: for simulation_line in simulation_line_list:
self.assertEquals(simulation_line.getStartDate(),self.datetime + 15) self.assertEquals(simulation_line.getStartDate(),self.datetime + 15)
def stepEditPackingListLine(self,sequence=None, sequence_list=None, **kw):
"""
Edits a Packing List Line
"""
packing_list_line = sequence.get('packing_list_line')
packing_list_line.edit(description='This line was edited!')
def stepDeletePackingListLine(self,sequence=None, sequence_list=None, **kw): def stepDeletePackingListLine(self,sequence=None, sequence_list=None, **kw):
""" """
Create a empty organisation Deletes a Packing List Line
""" """
packing_list = sequence.get('packing_list') packing_list = sequence.get('packing_list')
packing_list_line_id = sequence.get('packing_list_line').getId() packing_list_line_id = sequence.get('packing_list_line').getId()
packing_list.manage_delObjects([packing_list_line_id]) packing_list.manage_delObjects([packing_list_line_id])
def stepAddPackingListLine(self,sequence=None, sequence_list=None, **kw):
"""
Adds a Packing List Line
"""
packing_list = sequence.get('packing_list')
packing_list_line = packing_list.newContent(
portal_type=self.packing_list_line_portal_type)
self.stepCreateNotVariatedResource(sequence=sequence,
sequence_list=sequence_list, **kw)
resource = sequence.get('resource')
packing_list_line.setResourceValue(resource)
packing_list_line.edit(price=100, quantity=200)
def stepCheckSimulationConnected(self,sequence=None, sequence_list=None, **kw): def stepCheckSimulationConnected(self,sequence=None, sequence_list=None, **kw):
""" """
Check if simulation movement are disconnected Check if simulation movement are disconnected
......
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