Ignore:
Timestamp:
11 Nov 2012, 16:21:21 (12 years ago)
Author:
Henrik Bettermann
Message:

Set bed type correctly.

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

Legend:

Unmodified
Added
Removed
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/tests/test_utils.py

    r9347 r9614  
    1414        acc_details  = students_utils.getAccommodationDetails(self.student)
    1515        self.assertEqual(acc_details['bt'], 'regular_male_fr')
     16
    1617        self.student['studycourse'].current_level = 200
    1718        acc_details  = students_utils.getAccommodationDetails(self.student)
    1819        self.assertEqual(acc_details['bt'], 'regular_male_re')
     20
     21        self.student['studycourse'].current_level = 210
     22        acc_details  = students_utils.getAccommodationDetails(self.student)
     23        self.assertEqual(acc_details['bt'], 'regular_male_re')
     24
    1925        self.student['studycourse'].current_level = 300
    2026        acc_details  = students_utils.getAccommodationDetails(self.student)
    2127        self.assertEqual(acc_details['bt'], 'regular_male_fi')
     28
    2229        self.student['studycourse'].current_level = 400
    2330        acc_details  = students_utils.getAccommodationDetails(self.student)
    24         self.assertEqual(acc_details['bt'], 'regular_male_fi')
     31        self.assertEqual(acc_details['bt'], 'regular_male_fr')
     32
    2533        self.student['studycourse'].current_level = 500
     34        acc_details  = students_utils.getAccommodationDetails(self.student)
     35        self.assertEqual(acc_details['bt'], 'regular_male_re')
     36
     37        self.student['studycourse'].current_level = 510
     38        acc_details  = students_utils.getAccommodationDetails(self.student)
     39        self.assertEqual(acc_details['bt'], 'regular_male_re')
     40
     41        self.student['studycourse'].current_level = 600
    2642        acc_details  = students_utils.getAccommodationDetails(self.student)
    2743        self.assertEqual(acc_details['bt'], 'regular_male_fi')
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/utils.py

    r9568 r9614  
    204204        if current_level == 10:
    205205            bt = 'pr'
    206         elif current_level == 100:
     206        elif current_level in (100, 400):
    207207            bt = 'fr'
    208         elif current_level >= 300:
     208        elif current_level in (300, 600):
    209209            bt = 'fi'
    210210        else:
Note: See TracChangeset for help on using the changeset viewer.