Commit f8bd94af authored by Sebastien Robin's avatar Sebastien Robin

add method for the test of Available inventory

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11265 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dbc16faa
......@@ -48,13 +48,11 @@ if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
class TestERP5BankingCheckPayment(TestERP5BankingMixin, ERP5TypeTestCase):
class TestERP5BankingCheckPaymentMixin:
"""
Unit test class for the check payment module
"""
login = PortalTestCase.login
# pseudo constants
RUN_ALL_TEST = 1 # we want to run all test
QUIET = 0 # we don't want the test to be quiet
......@@ -122,6 +120,7 @@ class TestERP5BankingCheckPayment(TestERP5BankingMixin, ERP5TypeTestCase):
'quantity': self.quantity_5000}
line_list = [inventory_dict_line_1, inventory_dict_line_2, inventory_dict_line_3]
self.line_list = line_list
self.bi_counter = self.paris.surface.banque_interne
self.bi_counter_vault = self.paris.surface.banque_interne.guichet_1.encaisse_des_billets_et_monnaies.sortante
self.createCashInventory(source=None, destination=self.bi_counter_vault, currency=self.currency_1,
......@@ -175,6 +174,9 @@ class TestERP5BankingCheckPayment(TestERP5BankingMixin, ERP5TypeTestCase):
self.check_4 = self.createCheck(id='check_4',
reference='53',
checkbook=self.checkbook_1)
self.check_5 = self.createCheck(id='check_5',
reference='54',
checkbook=self.checkbook_1)
def stepCheckObjects(self, sequence=None, sequence_list=None, **kwd):
"""
......@@ -245,6 +247,10 @@ class TestERP5BankingCheckPayment(TestERP5BankingMixin, ERP5TypeTestCase):
""" Make sure we can validate another check payment """
self.createAnotherCheckPayment(sequence=sequence,will_fail=0,number="51")
def stepValidateAnotherCheckPaymentWorksAgain(self, sequence=None, sequence_list=None, **kwd):
""" Make sure we can validate another check payment """
self.createAnotherCheckPayment(sequence=sequence,will_fail=0,number="54")
def stepValidateAnotherCheckPaymentFails(self, sequence=None, sequence_list=None, **kwd):
""" Make sure that we can not validate another check payment """
self.createAnotherCheckPayment(sequence=sequence,will_fail=1,number="52")
......@@ -369,6 +375,13 @@ class TestERP5BankingCheckPayment(TestERP5BankingMixin, ERP5TypeTestCase):
self.assertEqual(self.simulation_tool.getFutureInventory(payment=self.bank_account_1.getRelativeUrl()), 80000)
class TestERP5BankingCheckPayment(TestERP5BankingCheckPaymentMixin,
TestERP5BankingMixin, ERP5TypeTestCase):
# pseudo constants
RUN_ALL_TEST = 1 # we want to run all test
QUIET = 0 # we don't want the test to be quiet
def test_01_ERP5BankingCheckPayment(self, quiet=QUIET, run=RUN_ALL_TEST):
"""
Define the sequence of step that will be play
......
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