- Timestamp:
- 24 Oct 2012, 06:37:08 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.futminna/trunk/src/waeup/futminna/students/tests/test_browser.py
r9402 r9403 32 32 IExtFileStore, IFileStoreNameChooser) 33 33 from waeup.kofa.students.interfaces import IStudentsUtils 34 from waeup.kofa.hostels.hostel import Bed, NOT_OCCUPIED 34 35 from waeup.futminna.testing import FunctionalLayer 35 36 … … 92 93 self.student['studycourse'].current_verdict = 'A' 93 94 self.student['studycourse'].current_level = 100 95 # Add sse bed 96 bed = Bed() 97 bed.bed_id = u'hall-1_A_101_C' 98 bed.bed_number = 2 99 bed.owner = NOT_OCCUPIED 100 bed.bed_type = u'sse_male_fr' 101 self.app['hostels']['hall-1'].addBed(bed) 94 102 95 103 def test_get_returning_data(self): … … 162 170 details = utils.getAccommodationDetails(self.student) 163 171 self.assertEqual(details['bt'], u'sse_male_fr') 172 173 def test_student_accommodation(self): 174 # Login 175 self.browser.open(self.login_path) 176 self.browser.getControl(name="form.login").value = self.student_id 177 self.browser.getControl(name="form.password").value = 'spwd' 178 self.browser.getControl("Login").click() 179 180 # Students can book accommodation without AC ... 181 self.browser.open(self.acco_path) 182 IWorkflowState(self.student).setState('admitted') 183 self.browser.getLink("Book accommodation").click() 184 self.assertFalse('Activation Code:' in self.browser.contents) 185 self.browser.getControl("Create bed ticket").click() 186 # Bed is randomly selected but, since there is only 187 # one bed for this student, we know that 188 self.assertMatches('...Hall 1, Block A, Room 101, Bed C...', 189 self.browser.contents) 190 return
Note: See TracChangeset for help on using the changeset viewer.