Ignore:
Timestamp:
7 Oct 2015, 20:25:08 (9 years ago)
Author:
Henrik Bettermann
Message:

Only fresh and final students are allowed to pay bed allocation fee.

Students in faculty MED get bed spaces in clinical hostels (not yet conformed by med).

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
2 edited

Legend:

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

    r13283 r13296  
    618618        error, payment = utils.setPaymentDetails('bed_allocation',
    619619            self.student, None, None)
     620        self.assertTrue(u'Amount could not be determined.' in error)
     621        self.student['studycourse'].current_session = 2004
     622        self.student['studycourse'].entry_session = 2004
     623        self.student['studycourse'].current_level = 100
     624        error, payment = utils.setPaymentDetails('bed_allocation',
     625            self.student, None, None)
    620626        self.assertEqual(payment.p_level, 100)
    621627        self.assertEqual(payment.p_session, 2004)
    622         self.assertEqual(payment.amount_auth, 150.0)
    623         self.assertEqual(payment.p_item, u'regular_male_re')
     628        self.assertEqual(payment.amount_auth, 650.0) # plus 500 student union
     629        self.assertEqual(payment.p_item, u'regular_male_fr')
    624630        self.assertEqual(error, None)
    625631
     
    985991        self.browser.getControl(name="ac_number").value = sfenumber
    986992        self.browser.getControl("Create bed ticket").click()
    987         self.assertMatches('...Hall 1, Block A, Room 101, Bed C...',
     993        self.assertMatches('...Hall 1, Block/Unit A, Room 101, Bed C...',
    988994                           self.browser.contents)
    989995        # Bed has been allocated.
     
    9951001        # The bed ticket displays the data correctly.
    9961002        self.browser.open(self.acco_path + '/2004')
    997         self.assertMatches('...Hall 1, Block A, Room 101, Bed C...',
     1003        self.assertMatches('...Hall 1, Block/Unit A, Room 101, Bed C...',
    9981004                           self.browser.contents)
    9991005        self.assertMatches('...2004/2005...', self.browser.contents)
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r13295 r13296  
    116116            sex = 'male'
    117117        special_handling = 'regular'
     118        if student.faccode == 'MED':
     119            special_handling = 'clinical'
    118120        d['bt'] = u'%s_%s_%s' % (special_handling,sex,bt)
    119121        return d
     
    181183            if stage == 'fr':
    182184                amount += 500.0
    183             else:
     185            elif stage == 'fi' and student.current_verdict in ('A', 'B'):
    184186                amount += 300.0
     187            else:
     188                amount = 0.0
    185189        elif category == 'hostel_maintenance':
    186190            amount = 0.0
Note: See TracChangeset for help on using the changeset viewer.