Changeset 9414 for main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py
- Timestamp:
- 25 Oct 2012, 09:44:02 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py
r9283 r9414 313 313 self.assertMatches( 314 314 '...No allocated bed selected...', self.browser.contents) 315 # Managers can manually allocate students after cancellation315 # Managers can manually allocate eligible students after cancellation 316 316 self.browser.open(self.container_path + '/hall-1/hall-1_A_101_A') 317 self.browser.getControl(name="form.owner").value = [self.student_id] 317 self.browser.getControl(name="form.owner").value = 'nonsense' 318 self.browser.getControl("Save").click() 319 self.assertMatches( 320 "...Either student does not exist or is not in accommodation session...", 321 self.browser.contents) 322 self.browser.getControl(name="form.owner").value = self.student_id 318 323 self.browser.getControl("Save").click() 319 324 self.assertMatches("...Form has been saved...", self.browser.contents) 325 # Students can only be allocated once 326 self.browser.open(self.container_path + '/hall-1/hall-1_A_101_B') 327 self.browser.getControl(name="form.owner").value = self.student_id 328 self.browser.getControl("Save").click() 329 self.assertMatches( 330 "...This student resides in bed hall-1_A_101_A...", 331 self.browser.contents) 320 332 # If we open the same form again, we will be redirected to hostel 321 333 # manage page. Beds must be released first before they can be … … 347 359 # Also the number of the bed has changed. 348 360 self.assertFalse(new_number == old_number) 349 # The number of occupied bed are displayed on container page.361 # The number of occupied beds are displayed on container page. 350 362 self.browser.open(self.container_path) 351 363 self.assertTrue('1 of 8' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.