source: main/waeup.fceokene/trunk/src/waeup/fceokene/students/tests/test_utils.py @ 9819

Last change on this file since 9819 was 9207, checked in by Henrik Bettermann, 12 years ago

Customize getAccommodationDetails.

  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1# -*- coding: utf-8 -*-
2from waeup.kofa.testing import FunctionalTestCase
3from zope.component import getUtility
4from waeup.kofa.students.interfaces import IStudentsUtils
5from waeup.kofa.students.tests.test_browser import StudentsFullSetup
6from waeup.fceokene.testing import FunctionalLayer
7
8class BedAllocationTests(StudentsFullSetup):
9
10    layer = FunctionalLayer
11
12    def test_getAccommodationDetails(self):
13        students_utils = getUtility(IStudentsUtils)
14        acc_details  = students_utils.getAccommodationDetails(self.student)
15        self.assertEqual(acc_details['bt'], 'regular_male_fr')
16        self.student['studycourse'].current_level = 200
17        acc_details  = students_utils.getAccommodationDetails(self.student)
18        self.assertEqual(acc_details['bt'], 'regular_male_re')
19        self.student['studycourse'].current_level = 300
20        acc_details  = students_utils.getAccommodationDetails(self.student)
21        self.assertEqual(acc_details['bt'], 'regular_male_fi')
22        self.student['studycourse'].current_level = 400
23        acc_details  = students_utils.getAccommodationDetails(self.student)
24        self.assertEqual(acc_details['bt'], 'regular_male_fi')
25        self.student['studycourse'].current_level = 500
26        acc_details  = students_utils.getAccommodationDetails(self.student)
27        self.assertEqual(acc_details['bt'], 'regular_male_fi')
28        return
Note: See TracBrowser for help on using the repository browser.