Changeset 7024 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 7 Nov 2011, 18:21:42 (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
r7023 r7024 917 917 @grok.action('Create ticket') 918 918 def createTicket(self, **data): 919 p_category = data['p_category'] 920 student = self.context.__parent__ 921 if p_category == 'bed_allocation' and student[ 922 'studycourse'].current_session != grok.getSite()[ 923 'configuration'].accommodation_session: 924 self.flash( 925 'Your current session does not match accommodation session.') 926 self.redirect(self.url(self.context)) 927 return 919 928 payment = createObject(u'waeup.StudentOnlinePayment') 920 929 self.applyData(payment, **data) … … 923 932 payment.p_id = "p%s" % timestamp 924 933 pay_details = self.getPaymentDetails( 925 data['p_category'],self.context.__parent__)934 p_category,student) 926 935 if pay_details['error']: 927 936 self.flash(pay_details['error']) -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r7022 r7024 863 863 self.browser.getControl("Add online payment ticket").click() 864 864 self.browser.getControl(name="form.p_category").value = ['bed_allocation'] 865 # If student is not in accommodation session, payment cannot be processed 866 self.app['configuration'].accommodation_session = 2011 867 self.browser.getControl("Create ticket").click() 868 self.assertMatches('...Your current session does not match...', 869 self.browser.contents) 870 self.app['configuration'].accommodation_session = 2004 871 self.browser.getControl("Add online payment ticket").click() 872 self.browser.getControl(name="form.p_category").value = ['bed_allocation'] 865 873 self.browser.getControl("Create ticket").click() 866 874 ctrl = self.browser.getControl(name='val_id')
Note: See TracChangeset for help on using the changeset viewer.