Changeset 15867
- Timestamp:
- 5 Dec 2019, 16:50:14 (5 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py
r15861 r15867 288 288 self.browser.getControl(name="form.email").value = 'xx@yy.zz' 289 289 self.browser.getControl(name="form.nationality").value = ['NG'] 290 #self.browser.getControl(name="form.sex").value = ['f']291 290 self.browser.getControl(name="form.firstname").value = 'Angela' 292 291 self.browser.getControl(name="form.lastname").value = 'Merkel' … … 306 305 self.browser.getControl("Add online payment ticket").click() 307 306 self.assertTrue('Payment ticket created' in self.browser.contents) 308 self.assertTrue('<span> 100.0</span>' in self.browser.contents)309 self.assertEqual(applicant.values()[0].amount_auth, 100.0)307 self.assertTrue('<span>200.0</span>' in self.browser.contents) 308 self.assertEqual(applicant.values()[0].amount_auth, 200.0) 310 309 return 311 310 -
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
r15837 r15867 42 42 INSTITUTION_NAME = 'AAU Ekpoma' 43 43 CURRENCY = '566' 44 GATEWAY_AMT = 2 50.044 GATEWAY_AMT = 200.0 45 45 POST_ACTION = 'https://webpay.interswitchng.com/paydirect/pay' 46 46 -
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py
r15763 r15867 88 88 in self.browser.contents) 89 89 self.assertTrue( 90 'item_name="Application Fee" item_amt="7 75000" bank_id="117" acct_num="1010835352"'90 'item_name="Application Fee" item_amt="780000" bank_id="117" acct_num="1010835352"' 91 91 in self.browser.contents) 92 92 self.assertTrue( … … 119 119 in self.browser.contents) 120 120 self.assertTrue( 121 'item_name="Application Fee" item_amt="5 75000" bank_id="117" acct_num="1010835352"'121 'item_name="Application Fee" item_amt="580000" bank_id="117" acct_num="1010835352"' 122 122 in self.browser.contents) 123 123 self.assertTrue( … … 153 153 in self.browser.contents) 154 154 self.assertTrue( 155 'item_name="Application Fee" item_amt="7 75000" bank_id="117" acct_num="1010835352"'155 'item_name="Application Fee" item_amt="780000" bank_id="117" acct_num="1010835352"' 156 156 in self.browser.contents) 157 157 self.assertTrue( … … 184 184 in self.browser.contents) 185 185 self.assertTrue( 186 'item_name="Application Fee" item_amt="7 75000" bank_id="7" acct_num="1014847058"'186 'item_name="Application Fee" item_amt="780000" bank_id="7" acct_num="1014847058"' 187 187 in self.browser.contents) 188 188 … … 208 208 self.certificate.study_mode = 'ug_pt' 209 209 self.student['studycourse'].entry_session = 2013 210 self.student['studycourse'].certificate.school_fee_1 = 502 50.0210 self.student['studycourse'].certificate.school_fee_1 = 50200.0 211 211 self.app['configuration']['2004'].union_fee = 1000.0 212 212 self.app['configuration']['2004'].welfare_fee = 500.0 … … 224 224 self.browser.getLink(self.value).click() 225 225 self.assertTrue('Amount Authorized' in self.browser.contents) 226 # 502 50 + 1000 + 500 -500227 self.assertTrue('<span>51 250.0</span>' in self.browser.contents)226 # 50200 + 1000 + 500 - 400 227 self.assertTrue('<span>51300.0</span>' in self.browser.contents) 228 228 self.payment_url = self.browser.url 229 229 self.browser.getLink("Pay via Interswitch", index=0).click() … … 240 240 self.assertEqual(self.student.current_mode, 'ug_pt') 241 241 self.assertTrue( 242 '<input type="hidden" name="amount" value="51 25000" />'242 '<input type="hidden" name="amount" value="5130000" />' 243 243 in self.browser.contents) 244 244 self.assertTrue( … … 285 285 in self.browser.contents) 286 286 self.assertTrue( 287 'item_name="School Fee Plus" item_amt="475 0000" bank_id="117" '287 'item_name="School Fee Plus" item_amt="4755000" bank_id="117" ' 288 288 'acct_num="1010827641"' in self.browser.contents) 289 289 290 290 def test_interswitch_form_pt_acceptance_fees(self): 291 291 self.certificate.study_mode = 'ug_pt' 292 self.app['configuration']['2004'].clearance_fee_ug_pt = 402 50.0292 self.app['configuration']['2004'].clearance_fee_ug_pt = 40200.0 293 293 self.app['configuration']['2004'].matric_gown_fee = 2000.0 294 294 self.app['configuration']['2004'].lapel_fee = 800.0 … … 306 306 self.browser.getLink(self.value).click() 307 307 self.assertTrue('Amount Authorized' in self.browser.contents) 308 # 402 50 + 2000 + 800 - 500309 self.assertTrue('<span>42 550.0</span>' in self.browser.contents)308 # 40200 + 2000 + 800 - 400 309 self.assertTrue('<span>42600.0</span>' in self.browser.contents) 310 310 self.payment_url = self.browser.url 311 311 self.browser.getLink("Pay via Interswitch", index=0).click() … … 314 314 self.assertTrue('Total Amount Authorized:' in self.browser.contents) 315 315 self.assertTrue( 316 '<input type="hidden" name="amount" value="42 55000" />'316 '<input type="hidden" name="amount" value="4260000" />' 317 317 in self.browser.contents) 318 318 self.assertTrue( … … 347 347 in self.browser.contents) 348 348 self.assertTrue( 349 'item_name="Acceptance Fee Plus" item_amt="413 0000" bank_id="117" '349 'item_name="Acceptance Fee Plus" item_amt="4135000" bank_id="117" ' 350 350 'acct_num="1010827641"' in self.browser.contents) 351 351 … … 378 378 in self.browser.contents) 379 379 self.assertTrue( 380 'item_name="Concessional Fee" item_amt="13 1700" '380 'item_name="Concessional Fee" item_amt="136700" ' 381 381 'bank_id="117" acct_num="1010827641"' 382 382 in self.browser.contents) -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r15803 r15867 274 274 self.assertEqual(self.student['payments'].values()[0].p_category, 'schoolfee_1') 275 275 self.assertEqual(self.student['payments'].values()[1].p_category, 'schoolfee_2') 276 # (6666-2 50)/2 + 1250 + 750 - 500 + 250277 self.assertEqual(self.student['payments'].values()[0].amount_auth, 4958.0)278 # (6666-2 50)/2 + 250279 self.assertEqual(self.student['payments'].values()[1].amount_auth, 34 58.0)276 # (6666-200)/2 + 1250 + 750 - 400 + 200 277 self.assertEqual(self.student['payments'].values()[0].amount_auth, 5033.0) 278 # (6666-200)/2 + 200 279 self.assertEqual(self.student['payments'].values()[1].amount_auth, 3433.0) 280 280 # The two payments belong to the same session and level. 281 281 self.assertEqual(self.student['payments'].values()[0].p_session, 2015) … … 309 309 self.browser.getControl("Create ticket").click() 310 310 self.assertTrue('ticket created' in self.browser.contents) 311 # (5666-2 50)/2 + 1250 + 750 - 500 + 250312 self.assertEqual(self.student['payments'].values()[2].amount_auth, 4 458.0)313 # (5666-2 50)/2 + 250314 self.assertEqual(self.student['payments'].values()[3].amount_auth, 29 58.0)311 # (5666-200)/2 + 1250 + 750 - 400 + 200 312 self.assertEqual(self.student['payments'].values()[2].amount_auth, 4533.0) 313 # (5666-200)/2 + 200 314 self.assertEqual(self.student['payments'].values()[3].amount_auth, 2933.0) 315 315 # The last two payments belong to the same session and level. 316 316 self.assertEqual(self.student['payments'].values()[2].p_session, 2016) … … 613 613 self.student['studycourse'].current_session = 2016 614 614 self.student['studycourse'].entry_mode = 'ug_ft' 615 self.student['studycourse'].certificate.school_fee_1 = 502 50.0616 self.app['configuration']['2016'].union_fee = 12 50.0617 self.app['configuration']['2016'].welfare_fee = 7 50.0618 self.app['configuration']['2016'].id_card_fee = 3 50.0615 self.student['studycourse'].certificate.school_fee_1 = 50200.0 616 self.app['configuration']['2016'].union_fee = 1200.0 617 self.app['configuration']['2016'].welfare_fee = 700.0 618 self.app['configuration']['2016'].id_card_fee = 300.0 619 619 self.student.nationality = u'NG' 620 620 # Login … … 633 633 self.browser.getLink(value).click() 634 634 self.assertTrue('Amount Authorized' in self.browser.contents) 635 # 502 50 + 1000 + 500 + 100 = 51850636 self.assertEqual(self.student['payments'][value].amount_auth, 518 50.0)635 # 50200 + 1200 + 700 + 300 - 600 = 51800 636 self.assertEqual(self.student['payments'][value].amount_auth, 51800.0) 637 637 self.student['payments'][value].r_company = u'interswitch' 638 638 self.browser.open(self.browser.url + '/payment_slip.pdf')
Note: See TracChangeset for help on using the changeset viewer.