Commit f203bbac authored by Sebastien Robin's avatar Sebastien Robin

modify the test because the destination of exchange line when the decision is...

modify the test because the destination of exchange line when the decision is taken into the headquartes was modified

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14830 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 911f2792
...@@ -178,6 +178,9 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -178,6 +178,9 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
# check source reference # check source reference
self.assertNotEqual(self.mutilated_banknote.getSourceReference(), '') self.assertNotEqual(self.mutilated_banknote.getSourceReference(), '')
self.assertNotEqual(self.mutilated_banknote.getSourceReference(), None) self.assertNotEqual(self.mutilated_banknote.getSourceReference(), None)
# headquarter is used in order to know if the document will go to the
# headquarter or not.
sequence.edit(headquarter=0)
def stepTryStopWithNoLineDefined(self, sequence=None, sequence_list=None, **kw): def stepTryStopWithNoLineDefined(self, sequence=None, sequence_list=None, **kw):
...@@ -258,7 +261,11 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -258,7 +261,11 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(cell.getPortalType(), 'Cash Delivery Cell') self.assertEqual(cell.getPortalType(), 'Cash Delivery Cell')
self.assertEqual(cell.getResourceValue(), self.billet_10000) self.assertEqual(cell.getResourceValue(), self.billet_10000)
self.assertEqual(cell.getBaobabSourceValue(), None) self.assertEqual(cell.getBaobabSourceValue(), None)
self.assertEqual(cell.getBaobabDestination(), self.usual_vault.getRelativeUrl()) headquarter = sequence.get('headquarter', 0)
if headquarter:
self.assertEqual(cell.getBaobabDestination(), None)
else:
self.assertEqual(cell.getBaobabDestination(), self.usual_vault.getRelativeUrl())
if cell.getId() == 'movement_0_0_0': if cell.getId() == 'movement_0_0_0':
self.assertEqual(cell.getQuantity(), 2.0) self.assertEqual(cell.getQuantity(), 2.0)
elif cell.getId() == 'movement_0_1_0': elif cell.getId() == 'movement_0_1_0':
...@@ -417,8 +424,8 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -417,8 +424,8 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
""" """
Check the initial inventory before any operations Check the initial inventory before any operations
""" """
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.usual_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0) self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.usual_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.usual_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 5.0) self.assertEqual(self.simulation_tool.getFutureInventory(node=self.usual_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0)
self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0) self.assertEqual(self.simulation_tool.getCurrentInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0)
self.assertEqual(self.simulation_tool.getFutureInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0) self.assertEqual(self.simulation_tool.getFutureInventory(node=self.mutilated_banknote_vault.getRelativeUrl(), resource = self.billet_10000.getRelativeUrl()), 0.0)
...@@ -553,6 +560,7 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase): ...@@ -553,6 +560,7 @@ class TestERP5BankingMutilatedBanknote(TestERP5BankingMixin, ERP5TypeTestCase):
self.workflow_tool.doActionFor(self.hq_mutilated_banknote, 'finish_action', wf_id='mutilated_banknote_workflow') self.workflow_tool.doActionFor(self.hq_mutilated_banknote, 'finish_action', wf_id='mutilated_banknote_workflow')
self.stepTic() self.stepTic()
self.assertEqual(self.hq_mutilated_banknote.getSimulationState(), "finished") self.assertEqual(self.hq_mutilated_banknote.getSimulationState(), "finished")
sequence.edit(headquarter=1)
def stepCheckHQFinalInventoryWithNoPayBack(self, sequence=None, sequence_list=None, **kwd): def stepCheckHQFinalInventoryWithNoPayBack(self, sequence=None, sequence_list=None, **kwd):
""" """
......
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