Changeset 7061 for main/waeup.sirp/trunk/src/waeup/sirp/students
- Timestamp:
- 9 Nov 2011, 15:26:49 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7060 r7061 1236 1236 self.redirect(self.url(self.context)) 1237 1237 return 1238 if str(grok.getSite()[ 1239 'configuration'].accommodation_session) in self.context.keys(): 1238 if student['studycourse'].current_session != acc_details['booking_session']: 1239 self.flash( 1240 'Your current session does not match accommodation session.') 1241 self.redirect(self.url(self.context)) 1242 return 1243 if str(acc_details['booking_session']) in self.context.keys(): 1240 1244 self.flash('You already booked a bed space in current accommodation session.') 1241 1245 self.redirect(self.url(self.context)) -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r7060 r7061 132 132 parts = self.existing_clrpin.split('-')[1:] 133 133 self.existing_clrseries, self.existing_clrnumber = parts 134 # Create 2 access codes with prefix 'HOS' 135 pin_container.createBatch( 136 datetime.now(), 'some_userid', 'HOS', 9.99, 2) 137 pins = pin_container['HOS-1'].values() 138 self.existing_hosac = pins[0] 139 self.existing_hospin = pins[0].representation 140 parts = self.existing_hospin.split('-')[1:] 141 self.existing_hosseries, self.existing_hosnumber = parts 134 142 135 143 # Populate university … … 920 928 self.browser.contents) 921 929 IWorkflowInfo(self.student).fireTransition('admit') 930 # An existing HOS code can only be used if students 931 # are in accommodation session 932 self.student['studycourse'].current_session = 2003 933 self.browser.getLink("Book accommodation").click() 934 self.assertMatches('...Your current session does not match...', 935 self.browser.contents) 936 self.student['studycourse'].current_session = 2004 937 # All requirements are met and ticket can be created 922 938 self.browser.getLink("Book accommodation").click() 923 939 self.assertMatches('...Activation Code:...',
Note: See TracChangeset for help on using the changeset viewer.