Ignore:
Timestamp:
2 Nov 2012, 16:58:01 (12 years ago)
Author:
Henrik Bettermann
Message:

In Uniben students can pay for next session in all states > cleared.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r9459 r9513  
    464464        self.assertEqual(error, None)
    465465
    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.
    468468        IWorkflowState(self.student).setState('school fee paid')
     469        self.certificate.study_mode = 'special_pg_pt'
    469470        self.student.is_staff = False
    470471        self.student.nationality = u'NG'
    471472        self.certificate.school_fee_2 = 10000.0
     473
    472474        error, payment = utils.setPaymentDetails(
    473475            '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')
    479483        error, payment = utils.setPaymentDetails(
    480484            'schoolfee', self.student, None, None)
    481         self.assertEqual(payment.p_level, 100)
     485        self.assertEqual(payment.p_level, None)
    482486        self.assertEqual(payment.p_session, 2005)
    483487        self.assertEqual(payment.amount_auth, 10000.0)
    484488        self.assertEqual(payment.p_item, u'CERT1')
    485489        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')
    489492        error, payment = utils.setPaymentDetails(
    490493            '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)
    496495        self.assertEqual(payment.p_session, 2005)
    497496        self.assertEqual(payment.amount_auth, 10000.0)
Note: See TracChangeset for help on using the changeset viewer.