Changeset 14237 for main/waeup.uniben/trunk/src/waeup/uniben/interswitch
- Timestamp:
- 27 Oct 2016, 21:07:05 (8 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/interswitch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py
r14233 r14237 61 61 currency = CURRENCY 62 62 product_id = PRODUCT_ID 63 64 def dynamic_provider_amt(self, student): 65 if student.entry_session >= 2016: 66 return 2500.0 67 return 1500.0 63 68 64 69 def update(self): … … 83 88 if self.context.p_category == 'schoolfee': 84 89 if not self.context.p_item == 'Balance': 85 provider_amt = 2500.090 provider_amt = self.dynamic_provider_amt(student) 86 91 if student.current_mode.endswith('_ft'): 87 92 self.pay_item_id = '5700' … … 92 97 elif self.context.p_category == 'clearance': 93 98 self.pay_item_id = '5702' 94 provider_amt = 2500.099 provider_amt = self.dynamic_provider_amt(student) 95 100 elif self.context.p_category == 'gown': 96 101 self.pay_item_id = '5704' -
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py
r14233 r14237 95 95 in self.browser.contents) 96 96 self.assertTrue( 97 'item_name="School Fee" item_amt="3 735000" bank_id="8" acct_num="2017506430"'98 in self.browser.contents) 99 self.assertTrue( 100 'item_name="BT Education" item_amt=" 250000" bank_id="117" acct_num="1014261520"'97 'item_name="School Fee" item_amt="3835000" bank_id="8" acct_num="2017506430"' 98 in self.browser.contents) 99 self.assertTrue( 100 'item_name="BT Education" item_amt="150000" bank_id="117" acct_num="1014261520"' 101 101 in self.browser.contents) 102 102 … … 130 130 self.browser.getLink("CollegePAY", index=0).click() 131 131 # Split amounts have been set. 132 self.assertEqual(self.student['payments'][value].provider_amt, 2500.0)132 self.assertEqual(self.student['payments'][value].provider_amt, 1500.0) 133 133 self.assertEqual(self.student['payments'][value].gateway_amt, 150.0) 134 134 self.assertTrue('<input type="hidden" name="pay_item_id" value="5701" />' … … 138 138 in self.browser.contents) 139 139 self.assertTrue( 140 'item_name="School Fee" item_amt="1 735000" bank_id="8" acct_num="2017506430"'141 in self.browser.contents) 142 self.assertTrue( 143 'item_name="BT Education" item_amt=" 250000" bank_id="117" acct_num="1014261520"'140 'item_name="School Fee" item_amt="1835000" bank_id="8" acct_num="2017506430"' 141 in self.browser.contents) 142 self.assertTrue( 143 'item_name="BT Education" item_amt="150000" bank_id="117" acct_num="1014261520"' 144 144 in self.browser.contents) 145 145
Note: See TracChangeset for help on using the changeset viewer.