Ignore:
Timestamp:
2 May 2012, 06:58:29 (13 years ago)
Author:
Henrik Bettermann
Message:

Store individual cost when creating access codes after online payment.

File:
1 edited

Legend:

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

    r8307 r8322  
    175175        configuration = createObject('waeup.SessionConfiguration')
    176176        configuration.academic_session = 2004
     177        configuration.clearance_fee = 3456.0
    177178        self.app['configuration'].addSessionConfiguration(configuration)
    178179
     
    12941295                          self.browser.contents)
    12951296
     1297        # The authorized amount has been stored in the access code
     1298        self.assertEqual(
     1299            self.app['accesscodes']['SFE-0'].values()[0].cost,40000.0)
     1300
    12961301        # Callback can't be applied twice
    12971302        self.browser.open(payment_url + '/simulate_callback')
     
    13491354        pin = self.app['accesscodes']['CLR-0'].keys()[0]
    13501355        ac = self.app['accesscodes']['CLR-0'][pin]
    1351         ac.owner = self.student_id
     1356        self.assertEqual(ac.owner, self.student_id)
     1357        self.assertEqual(ac.cost, 3456.0)
    13521358        return
    13531359
     
    13841390        pin = self.app['accesscodes']['CLR-0'].keys()[0]
    13851391        ac = self.app['accesscodes']['CLR-0'][pin]
    1386         ac.owner = self.student_id
     1392        self.assertEqual(ac.owner, self.student_id)
     1393        self.assertEqual(ac.cost, 3456.0)
    13871394
    13881395        # Students can open the pdf payment slip
     
    14931500        pin = self.app['accesscodes']['HOS-0'].keys()[0]
    14941501        ac = self.app['accesscodes']['HOS-0'][pin]
    1495         ac.owner = self.student_id
     1502        self.assertEqual(ac.owner, self.student_id)
    14961503        parts = pin.split('-')[1:]
    14971504        sfeseries, sfenumber = parts
     
    16221629        pin = self.app['accesscodes']['HOS-0'].keys()[0]
    16231630        ac = self.app['accesscodes']['HOS-0'][pin]
    1624         ac.owner = u'Anybody'
    16251631        parts = pin.split('-')[1:]
    16261632        sfeseries, sfenumber = parts
     
    16401646        self.assertMatches('...Activation code is invalid...',
    16411647                           self.browser.contents)
     1648        ac.owner = u'Anybody'
    16421649        self.browser.getControl(name="ac_series").value = sfeseries
    16431650        self.browser.getControl(name="ac_number").value = sfenumber
Note: See TracChangeset for help on using the changeset viewer.