Ignore:
Timestamp:
19 Jul 2025, 06:41:05 (16 hours ago)
Author:
Henrik Bettermann
Message:

Disable sundry combi payments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/tests.py

    r18043 r18131  
    7676        # 250 gateway charge have been added
    7777        payment = self.student['payments'][self.value]
    78         self.assertEqual(payment.amount_auth, 7250)
     78        self.assertEqual(payment.amount_auth, 7800)
    7979        self.assertEqual(payment.net_amt, 7000)
    8080        self.assertTrue(
    81             '<input type="hidden" name="amount" value="725000" />' in
     81            '<input type="hidden" name="amount" value="780000" />' in
    8282            self.browser.contents)
    8383        # WAeAC charge have been substracted
     
    9090
    9191    def test_interswitch_required_combi(self):
     92        configuration = createObject('waeup.SessionConfiguration')
     93        configuration.academic_session = 2025
     94        self.app['configuration'].addSessionConfiguration(configuration)
    9295        # Student is a fresh non-science student
    9396        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     97        self.student['studycourse'].current_session = 2025
     98        self.student['studycourse'].entry_session = 2025
    9499        self.browser.open(self.payments_path)
    95100        IWorkflowState(self.student).setState('cleared')
     
    102107        self.browser.getControl(name="form.p_category").value = ['required_combi']
    103108        self.browser.getControl("Create payment").click()
    104         self.assertTrue('Student Health Insurance undefined.' in self.browser.contents)
    105         self.app['configuration']['2004'].registration_fresh_fee = 10000.0
    106         self.app['configuration']['2004'].book_fee = 10000.0
    107         self.app['configuration']['2004'].develop_fee = 10000.0
    108         self.app['configuration']['2004'].parentsconsult_fee = 10000.0
    109         self.app['configuration']['2004'].municipal_fresh_fee = 10000.0
    110         self.app['configuration']['2004'].matric_fee = 10000.0
    111         self.app['configuration']['2004'].waecneco_fee = 10000.0
    112         self.app['configuration']['2004'].jambver_fee = 10000.0
    113         self.app['configuration']['2004'].health_insurance_fee = 10000.0
    114         self.app['configuration']['2004'].id_card_fee = 10000.0
    115         self.app['configuration']['2004'].medical_screening_fee = 10000.0
     109        self.assertTrue('undefined.' in self.browser.contents)
     110        self.app['configuration']['2025'].registration_fresh_fee = 10000.0
     111        self.app['configuration']['2025'].book_fee = 10000.0
     112        self.app['configuration']['2025'].develop_fee = 10000.0
     113        self.app['configuration']['2025'].parentsconsult_fee = 10000.0
     114        self.app['configuration']['2025'].municipal_fresh_fee = 10000.0
     115        self.app['configuration']['2025'].matric_fee = 10000.0
     116        self.app['configuration']['2025'].waecneco_fee = 10000.0
     117        self.app['configuration']['2025'].jambver_fee = 10000.0
     118        self.app['configuration']['2025'].health_insurance_fee = 10000.0
     119        self.app['configuration']['2025'].id_card_fee = 10000.0
     120        self.app['configuration']['2025'].medical_screening_fee = 10000.0
    116121        self.browser.getControl(name="form.p_category").value = ['required_combi']
    117122        self.browser.getControl("Create payment").click()
     
    130135        # 250 gateway charge have been added
    131136        payment = self.student['payments'][self.value]
    132         self.assertEqual(payment.amount_auth, 110250)
     137        self.assertEqual(payment.amount_auth, 110800)
    133138        self.assertEqual(payment.net_amt, 110000)
    134139        self.assertTrue(
    135             '<input type="hidden" name="amount" value="11025000" />' in
     140            '<input type="hidden" name="amount" value="11080000" />' in
    136141            self.browser.contents)
    137142        self.assertTrue(
     
    139144            self.browser.contents)
    140145        self.assertTrue(
    141             'item_id="12" item_name="parentsconsult" item_amt="1000000" bank_id="117" acct_num="1228747029"' in
     146            'item_id="12" item_name="parentsconsult" item_amt="1000000" bank_id="117" acct_num="1012355544"' in
    142147            self.browser.contents)
    143148
     
    160165        # 250 gateway charge have been added
    161166        self.assertTrue(
    162             '<input type="hidden" name="amount" value="125000" />' in
    163             self.browser.contents)
    164         self.assertEqual(acc_payment.amount_auth, 1250)
     167            '<input type="hidden" name="amount" value="180000" />' in
     168            self.browser.contents)
     169        self.assertEqual(acc_payment.amount_auth, 1800)
    165170        self.assertEqual(acc_payment.net_amt, 1000)
    166171        delta = timedelta(days=8)
Note: See TracChangeset for help on using the changeset viewer.