Changeset 17431 for main/waeup.aaue/trunk/src/waeup/aaue/interswitch
- Timestamp:
- 16 Jun 2023, 11:43:53 (20 months ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue/interswitch
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py
r17083 r17431 71 71 self.browser.getControl("Save").click() 72 72 73 def test_interswitch_form_regular(self):73 def deactivated_test_interswitch_form_regular(self): 74 74 self.browser.getControl("Add online").click() 75 75 self.assertTrue('ticket created' in self.browser.contents) … … 101 101 in self.browser.contents) 102 102 103 def test_interswitch_form_pg(self):103 def deactivated_test_interswitch_form_pg(self): 104 104 self.applicant.applicant_id = u'pg_anything' 105 105 self.browser.getControl("Add online").click() … … 135 135 in self.browser.contents) 136 136 137 def test_interswitch_form_utme(self):137 def deactivated_test_interswitch_form_utme(self): 138 138 self.applicant.applicant_id = u'utme_anything' 139 139 self.browser.getControl("Add online").click() … … 166 166 in self.browser.contents) 167 167 168 def test_interswitch_form_bridge(self):168 def deactivated_test_interswitch_form_bridge(self): 169 169 self.applicant.applicant_id = u'bridge_xyz' 170 170 self.browser.getControl("Add online").click() … … 205 205 self.app['configuration']['2004'].interswitch_enabled = True 206 206 207 def test_interswitch_form_pt_school_fees(self):207 def disabled_test_interswitch_form_pt_school_fees(self): 208 208 self.certificate.study_mode = 'ug_pt' 209 209 self.student['studycourse'].entry_session = 2013 … … 232 232 self.student['payments']['xyz'] = acc_payment 233 233 self.browser.getLink("Pay via Interswitch", index=0).click() 234 self.assertTrue('<input type="hidden" name="pay_item_id" value="105" />'235 in self.browser.contents)236 234 self.assertTrue('Total Amount Authorized:' in self.browser.contents) 237 235 self.assertEqual(self.student.current_mode, 'ug_pt') … … 246 244 def test_interswitch_form_regular_school_fees(self): 247 245 self.certificate.study_mode = 'ug_ft' 248 self.student['studycourse'].entry_session = 2013249 self.student['studycourse'].certificate.school_fee_3 = 51750.0246 #self.student['studycourse'].entry_session = 2013 247 #self.student['studycourse'].certificate.school_fee_3 = 51750.0 250 248 # Manager can access InterswitchForm 251 249 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') … … 260 258 self.assertTrue('Amount Authorized' in 261 259 self.browser.contents) 262 self.assertTrue('<span>51750.0</span>' in self.browser.contents) 263 self.payment_url = self.browser.url 264 self.browser.getLink("Pay via Interswitch", index=0).click() 265 self.assertTrue( 266 'Please pay acceptance fee first' in self.browser.contents) 267 acc_payment = createObject('waeup.StudentOnlinePayment') 268 acc_payment.p_state = 'paid' 269 acc_payment.p_category = 'clearance' 270 self.student['payments']['xyz'] = acc_payment 271 self.browser.getLink("Pay via Interswitch", index=0).click() 272 self.assertTrue('<input type="hidden" name="pay_item_id" value="107" />' 273 in self.browser.contents) 260 self.assertTrue('<span>239500.0</span>' in self.browser.contents) 261 self.payment_url = self.browser.url 262 self.browser.getLink("Pay via Interswitch", index=0).click() 263 #self.assertTrue( 264 # 'Please pay acceptance fee first' in self.browser.contents) 265 #acc_payment = createObject('waeup.StudentOnlinePayment') 266 #acc_payment.p_state = 'paid' 267 #acc_payment.p_category = 'clearance' 268 #self.student['payments']['xyz'] = acc_payment 269 #self.browser.getLink("Pay via Interswitch", index=0).click() 274 270 self.assertTrue('Total Amount Authorized:' 275 271 in self.browser.contents) 276 272 self.assertEqual(self.student.current_mode, 'ug_ft') 277 273 self.assertTrue( 278 '<input type="hidden" name="amount" value="5175000" />' 279 in self.browser.contents) 280 self.assertTrue( 281 'item_name="School Fee Plus" item_amt="4755000" bank_id="117" ' 282 'acct_num="1010827641"' in self.browser.contents) 283 284 def test_interswitch_form_pt_acceptance_fees(self): 274 '<input type="hidden" name="amount" value="24220000" />' 275 in self.browser.contents) 276 self.assertTrue( 277 'item_name="Faculty Fee (tuition)" item_amt="18400000" bank_id="7" ' 278 'acct_num="1022438743"' in self.browser.contents) 279 280 self.student['studycourse'].entry_session = 2015 281 self.browser.open(self.payments_path + '/addop') 282 self.browser.getControl(name="form.p_category").value = ['schoolfee_2'] 283 self.browser.getControl("Create ticket").click() 284 self.assertTrue('ticket created' in 285 self.browser.contents) 286 self.assertTrue('<span>92000.0</span>' in self.browser.contents) 287 self.payment_url = self.browser.url 288 self.browser.getLink("Pay via Interswitch", index=0).click() 289 self.assertTrue( 290 '<input type="hidden" name="amount" value="9220000" />' 291 in self.browser.contents) 292 self.assertTrue( 293 'item_name="School Fee (2nd instalment)" item_amt="9200000" bank_id="7" acct_num="1022438743"' in self.browser.contents) 294 295 self.browser.open(self.payments_path + '/addop') 296 self.browser.getControl(name="form.p_category").value = ['schoolfee_1'] 297 self.browser.getControl("Create ticket").click() 298 self.assertTrue('ticket created' in 299 self.browser.contents) 300 self.assertTrue('<span>147500.0</span>' in self.browser.contents) 301 self.payment_url = self.browser.url 302 self.browser.getLink("Pay via Interswitch", index=0).click() 303 self.assertTrue( 304 '<input type="hidden" name="amount" value="15020000" />' 305 in self.browser.contents) 306 self.assertTrue( 307 'item_name="Faculty Fee (lmsplus)" item_amt="2000000" bank_id="7" acct_num="1022438743"' in self.browser.contents) 308 self.assertTrue( 309 'item_name="Faculty Fee (tuition)" item_amt="9200000" bank_id="7" acct_num="1022438743"' in self.browser.contents) 310 311 self.browser.open(self.payments_path + '/addop') 312 self.browser.getControl(name="form.p_category").value = ['schoolfee_2'] 313 self.browser.getControl("Create ticket").click() 314 self.assertTrue('ticket created' in 315 self.browser.contents) 316 self.assertTrue('<span>92000.0</span>' in self.browser.contents) 317 self.payment_url = self.browser.url 318 self.browser.getLink("Pay via Interswitch", index=0).click() 319 self.assertTrue( 320 '<input type="hidden" name="amount" value="9220000" />' 321 in self.browser.contents) 322 self.assertTrue( 323 'item_name="School Fee (2nd instalment)" item_amt="9200000" bank_id="7" acct_num="1022438743"' in self.browser.contents) 324 325 def disabled_test_interswitch_form_pt_acceptance_fees(self): 285 326 self.certificate.study_mode = 'ug_pt' 286 327 self.app['configuration']['2004'].clearance_fee_ug_pt = 40200.0 … … 301 342 self.payment_url = self.browser.url 302 343 self.browser.getLink("Pay via Interswitch", index=0).click() 303 self.assertTrue('<input type="hidden" name="pay_item_id" value="104" />' in304 self.browser.contents)305 344 self.assertTrue('Total Amount Authorized:' in self.browser.contents) 306 345 self.assertTrue( … … 314 353 def test_interswitch_form_regular_acceptance_fees(self): 315 354 self.certificate.study_mode = 'ug_ft' 316 self.app['configuration']['2004'].clearance_fee = 43050.0355 #self.app['configuration']['2004'].clearance_fee = 43050.0 317 356 # Manager can access InterswitchForm 318 357 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') … … 325 364 self.assertTrue('ticket created' in self.browser.contents) 326 365 self.assertTrue('Amount Authorized' in self.browser.contents) 327 self.assertTrue('<span>43050.0</span>' in self.browser.contents) 328 self.payment_url = self.browser.url 329 self.browser.getLink("Pay via Interswitch", index=0).click() 330 self.assertTrue('<input type="hidden" name="pay_item_id" value="102" />' 331 in self.browser.contents) 332 self.assertTrue('Total Amount Authorized:' in self.browser.contents) 333 self.assertTrue( 334 '<input type="hidden" name="amount" value="4305000" />' 335 in self.browser.contents) 336 self.assertTrue( 337 'item_name="Acceptance Fee Plus" item_amt="4135000" bank_id="117" ' 338 'acct_num="1010835352"' in self.browser.contents) 339 340 def test_interswitch_form_concessional_fees(self): 366 self.assertTrue('<span>16800.0</span>' in self.browser.contents) 367 self.browser.getLink("Pay via Interswitch", index=0).click() 368 self.assertTrue('Total Amount Authorized:' in self.browser.contents) 369 self.assertTrue( 370 '<input type="hidden" name="amount" value="1850000" />' 371 in self.browser.contents) 372 self.assertTrue(self.student['payments'].values()[0].net_amt == 16800) 373 self.assertTrue( 374 'item_name="Acceptance Fee (acceptance)" item_amt="1400000" bank_id="8" ' 375 'acct_num="2000249757"' in self.browser.contents) 376 377 self.certificate.study_mode = 'bridge' 378 self.browser.open(self.payments_path + '/addop') 379 self.browser.getControl(name="form.p_category").value = ['clearance'] 380 self.browser.getControl("Create ticket").click() 381 self.assertTrue('ticket created' in self.browser.contents) 382 self.assertTrue('Amount Authorized' in self.browser.contents) 383 self.assertTrue('<span>14000.0</span>' in self.browser.contents) 384 self.browser.getLink("Pay via Interswitch", index=0).click() 385 self.assertTrue('Total Amount Authorized:' in self.browser.contents) 386 self.assertTrue( 387 '<input type="hidden" name="amount" value="1570000" />' 388 in self.browser.contents) 389 self.assertTrue(self.student['payments'].values()[1].net_amt == 14000) 390 self.assertTrue( 391 'item_name="Acceptance Fee" item_amt="1400000" bank_id="8" ' 392 'acct_num="2000249757"' in self.browser.contents) 393 394 def deactivated_test_interswitch_form_concessional_fees(self): 341 395 self.certificate.study_mode = 'ug_ft' 342 396 self.app['configuration']['2004'].concessional_fee = 1567.0 … … 356 410 self.certificate.study_mode = 'ug_ft' 357 411 self.browser.getLink("Pay via Interswitch", index=0).click() 358 self.assertTrue('<input type="hidden" name="pay_item_id" value="107" />'359 in self.browser.contents)360 412 self.assertTrue('Total Amount Authorized:' in self.browser.contents) 361 413 self.assertTrue( … … 367 419 in self.browser.contents) 368 420 369 def test_interswitch_form_ticket_expired(self):421 def deactivated_test_interswitch_form_ticket_expired(self): 370 422 self.certificate.study_mode = 'ug_pt' 371 423 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') … … 380 432 self.browser.open(self.payments_path + '/xyz') 381 433 self.browser.getLink("Pay via Interswitch", index=0).click() 382 self.assertTrue('<input type="hidden" name="pay_item_id" value="104" />'383 in self.browser.contents)384 434 self.assertTrue('Total Amount Authorized:' in self.browser.contents) 385 435 self.assertEqual(self.student.current_mode, 'ug_pt')
Note: See TracChangeset for help on using the changeset viewer.