- Timestamp:
- 8 Nov 2011, 06:42:07 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r7026 r7027 981 981 parts = pin.split('-')[1:] 982 982 sfeseries, sfenumber = parts 983 983 984 # Students can use HOS code and book a bed space with it 984 985 self.browser.open(self.acco_student_path) … … 995 996 self.assertMatches('...Hall 1, Block A, Room 101, Bed A...', 996 997 self.browser.contents) 998 997 999 # Bed has been allocated 998 1000 bed = self.app['hostels']['hall-1']['hall-1_A_101_A'] 999 1001 self.assertTrue(bed.owner == self.student_id) 1002 1000 1003 # BedTicketAddPage is now blocked 1001 1004 self.browser.getLink("Book accommodation").click() 1002 1005 self.assertMatches('...You already booked a bed space...', 1003 1006 self.browser.contents) 1007 1004 1008 # The bed ticket displays the data correctly 1005 1009 self.browser.open(self.acco_student_path + '/2004') … … 1009 1013 self.assertMatches('...regular_male_fr...', self.browser.contents) 1010 1014 self.assertMatches('...%s...' % pin, self.browser.contents) 1015 1016 # Students can open the pdf slip 1017 self.browser.open(self.browser.url + '/bed_allocation.pdf') 1018 self.assertEqual(self.browser.headers['Status'], '200 Ok') 1019 self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf') 1020 1011 1021 # Students can't relocate themselves 1012 1022 self.assertFalse('Relocate' in self.browser.contents) … … 1014 1024 self.assertRaises( 1015 1025 Unauthorized, self.browser.open, relocate_path) 1026 1016 1027 # Students can't the Remove button and check boxes 1017 1028 self.browser.open(self.acco_student_path)
Note: See TracChangeset for help on using the changeset viewer.