Ignore:
Timestamp:
22 Jan 2013, 08:55:00 (12 years ago)
Author:
Henrik Bettermann
Message:

Remove school fee installment payments and restricted course registration. Seems that all these customizations have been a waste of time.

File:
1 edited

Legend:

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

    r9755 r9905  
    9292        self.browser.open(self.payments_path)
    9393        self.browser.getLink("Add current session payment ticket").click()
    94         self.browser.getControl(name="form.p_category").value = ['schoolfee_1']
     94        self.browser.getControl(name="form.p_category").value = ['schoolfee']
    9595        self.browser.getControl("Create ticket").click()
    9696        self.assertMatches('...Wrong state...',
     
    101101        self.assertMatches('...Amount could not be determined...',
    102102                           self.browser.contents)
    103         self.app['configuration']['2004'].school_fee_base = 6666.0
    104         self.browser.getControl(name="form.p_category").value = ['schoolfee_1']
     103        self.app['configuration']['2004'].school_fee = 6666.0
     104        self.browser.getControl(name="form.p_category").value = ['schoolfee']
    105105        self.browser.getControl("Create ticket").click()
    106106        self.assertMatches('...ticket created...',
     
    119119        ticket.p_state = 'paid'
    120120        self.browser.open(self.payments_path + '/addop')
    121         self.browser.getControl(name="form.p_category").value = ['schoolfee_1']
     121        self.browser.getControl(name="form.p_category").value = ['schoolfee']
    122122        self.browser.getControl("Create ticket").click()
    123123        self.assertMatches('...This type of payment has already been made...',
     
    151151        self.assertMatches('...ticket created...',
    152152                           self.browser.contents)
    153         # Remove all payments so that we can add a school fee payment again
    154         keys = [i for i in self.student['payments'].keys()]
    155         for payment in keys:
    156             del self.student['payments'][payment]
     153
     154
     155    def deactivated_test_for_instalment_payments(self):
     156        self.browser.addHeader('Authorization', 'Basic mgr:mgrpw')
     157        self.browser.open(self.payments_path)
    157158        self.browser.open(self.payments_path + '/addop')
    158159        self.browser.getControl(name="form.p_category").value = ['schoolfee_1']
     
    194195        configuration.academic_session = 2005
    195196        self.app['configuration'].addSessionConfiguration(configuration)
    196         self.app['configuration']['2005'].school_fee_base = 7777.0
     197        self.app['configuration']['2005'].school_base = 7777.0
    197198        self.browser.open(self.payments_path + '/addop')
    198199        self.browser.getControl(name="form.p_category").value = ['schoolfee_1']
     
    239240        self.app['configuration']['2004'].maint_fee = 180.0
    240241        self.app['configuration']['2004'].clearance_fee = 1234.0
    241         self.app['configuration']['2004'].school_fee_base = 6666.0
     242        self.app['configuration']['2004'].school_fee = 6666.0
    242243        utils = getUtility(IStudentsUtils)
    243244
     
    245246        configuration.academic_session = 2005
    246247        self.app['configuration'].addSessionConfiguration(configuration)
    247         self.app['configuration']['2005'].school_fee_base = 7777.0
    248 
    249         error, payment = utils.setPaymentDetails('schoolfee_1',self.student)
     248        self.app['configuration']['2005'].school_fee = 7777.0
     249
     250        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    250251        self.assertEqual(payment, None)
    251252        self.assertEqual(error, u'Wrong state.')
    252253
    253254        IWorkflowState(self.student).setState('cleared')
    254         error, payment = utils.setPaymentDetails('schoolfee_1',self.student)
     255        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    255256        self.assertEqual(payment.p_level, 100)
    256257        self.assertEqual(payment.p_session, 2004)
     
    264265        # ... for returning
    265266        self.app['configuration']['2005'].penalty_ug = 88.0
    266         error, payment = utils.setPaymentDetails('schoolfee_1',self.student)
     267        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    267268        self.assertEqual(payment.amount_auth, 6765.0)
    268269        IWorkflowState(self.student).setState('returning')
    269         error, payment = utils.setPaymentDetails('schoolfee_1',self.student)
     270        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    270271        self.assertEqual(payment.p_level, 200)
    271272        self.assertEqual(payment.p_session, 2005)
     
    313314        return
    314315
    315     def test_student_course_registration(self):
     316    def deactivated_test_student_course_registration(self):
    316317
    317318        # Add more courses
Note: See TracChangeset for help on using the changeset viewer.