Ignore:
Timestamp:
1 Nov 2013, 07:59:47 (11 years ago)
Author:
Henrik Bettermann
Message:

Set maintenance fee for each hostel.

File:
1 edited

Legend:

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

    r10647 r10681  
    199199        hostel.hostel_id = u'hall-1'
    200200        hostel.hostel_name = u'Hall 1'
     201        hostel.maint_fee = 876.0
    201202        self.app['hostels'].addHostel(hostel)
    202203        bed = Bed()
     
    29412942        self.assertMatches('...Payment ticket created...',
    29422943                           self.browser.contents)
     2944
     2945        ctrl = self.browser.getControl(name='val_id')
     2946        value = ctrl.options[0]
     2947        # Maintennace fee is taken from the hostel object
     2948        self.assertEqual(self.student['payments'][value].amount_auth, 876.0)
     2949        # If the hostel's maintenance fee isn't set, the fee is
     2950        # taken from the session configuration object.
     2951        self.app['hostels']['hall-1'].maint_fee = 0.0
     2952        self.browser.open(self.payments_path + '/addop')
     2953        self.browser.getControl(name="form.p_category").value = ['hostel_maintenance']
     2954        self.browser.getControl("Create ticket").click()
     2955        ctrl = self.browser.getControl(name='val_id')
     2956        value = ctrl.options[1]
     2957        self.assertEqual(self.student['payments'][value].amount_auth, 987.0)
    29432958        return
    29442959
Note: See TracChangeset for help on using the changeset viewer.