- Timestamp:
- 2 Nov 2012, 16:58:01 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py
r9459 r9513 464 464 self.assertEqual(error, None) 465 465 466 # In Uniben we have pg and special pg students.467 # They pay the same but their workflow is different.466 # In Uniben students can pay school fee in all states no matter 467 # if they are ug or pg students. 468 468 IWorkflowState(self.student).setState('school fee paid') 469 self.certificate.study_mode = 'special_pg_pt' 469 470 self.student.is_staff = False 470 471 self.student.nationality = u'NG' 471 472 self.certificate.school_fee_2 = 10000.0 473 472 474 error, payment = utils.setPaymentDetails( 473 475 'schoolfee', self.student, None, None) 474 self.assertEqual(payment, None) 475 self.assertTrue('not be determined' in error) 476 self.certificate.study_mode = 'pg_pt' 477 self.assertTrue(self.student.is_postgrad) 478 self.assertFalse(self.student.is_special_postgrad) 476 self.assertEqual(payment.p_level, None) 477 self.assertEqual(payment.p_session, 2005) 478 self.assertEqual(payment.amount_auth, 10000.0) 479 self.assertEqual(payment.p_item, u'CERT1') 480 self.assertEqual(error, None) 481 482 IWorkflowState(self.student).setState('courses registered') 479 483 error, payment = utils.setPaymentDetails( 480 484 'schoolfee', self.student, None, None) 481 self.assertEqual(payment.p_level, 100)485 self.assertEqual(payment.p_level, None) 482 486 self.assertEqual(payment.p_session, 2005) 483 487 self.assertEqual(payment.amount_auth, 10000.0) 484 488 self.assertEqual(payment.p_item, u'CERT1') 485 489 self.assertEqual(error, None) 486 self.certificate.study_mode = 'special_pg_pt' 487 self.assertTrue(self.student.is_postgrad) 488 self.assertTrue(self.student.is_special_postgrad) 490 491 IWorkflowState(self.student).setState('courses validated') 489 492 error, payment = utils.setPaymentDetails( 490 493 'schoolfee', self.student, None, None) 491 self.assertTrue('not be determined' in error) 492 IWorkflowState(self.student).setState('returning') 493 error, payment = utils.setPaymentDetails( 494 'schoolfee', self.student, None, None) 495 self.assertEqual(payment.p_level, 200) 494 self.assertEqual(payment.p_level, None) 496 495 self.assertEqual(payment.p_session, 2005) 497 496 self.assertEqual(payment.amount_auth, 10000.0)
Note: See TracChangeset for help on using the changeset viewer.