Ignore:
Timestamp:
12 Jul 2012, 08:53:27 (12 years ago)
Author:
Henrik Bettermann
Message:

Merged with waeup.fceokene 8978:8979.

Location:
main/waeup.futminna/trunk/src/waeup/futminna
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.futminna/trunk/src/waeup/futminna

  • main/waeup.futminna/trunk/src/waeup/futminna/students/tests/test_browser.py

    r8907 r8981  
    152152        self.browser.getControl(name="form.p_category").value = ['schoolfee']
    153153        self.browser.getControl("Create ticket").click()
     154        self.assertMatches('...Session configuration object is not...',
     155                           self.browser.contents)
     156        # Uups, we forgot to add a session configuration for next session
     157        configuration = createObject('waeup.SessionConfiguration')
     158        configuration.academic_session = 2005
     159        self.app['configuration'].addSessionConfiguration(configuration)
     160        self.browser.open(self.payments_path + '/addop')
     161        self.browser.getControl(name="form.p_category").value = ['schoolfee']
     162        self.browser.getControl("Create ticket").click()
    154163        self.assertMatches('...ticket created...',
    155164                           self.browser.contents)
     
    188197        utils = getUtility(IStudentsUtils)
    189198
     199        configuration = createObject('waeup.SessionConfiguration')
     200        configuration.academic_session = 2005
     201        self.app['configuration'].addSessionConfiguration(configuration)
     202
    190203        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    191204        self.assertEqual(payment, None)
     
    200213        self.assertEqual(error, None)
    201214
    202         # Add penalty fee.
     215        # Add penalty fee ...
     216        # ... for cleared
    203217        self.app['configuration']['2004'].penalty_ug = 99.0
     218        # ... for returning
     219        self.app['configuration']['2005'].penalty_ug = 88.0
    204220        error, payment = utils.setPaymentDetails('schoolfee',self.student)
    205221        self.assertEqual(payment.amount_auth, 40099.0)
     
    209225        self.assertEqual(payment.p_level, 200)
    210226        self.assertEqual(payment.p_session, 2005)
    211         self.assertEqual(payment.amount_auth, 20099.0)
     227        self.assertEqual(payment.amount_auth, 20088.0)
    212228        self.assertEqual(payment.p_item, u'CERT1')
    213229        self.assertEqual(error, None)
Note: See TracChangeset for help on using the changeset viewer.