Changeset 6927 for main/waeup.sirp/trunk/src/waeup/sirp/students
- Timestamp:
- 23 Oct 2011, 18:30:07 (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
r6920 r6927 1066 1066 comment = u"AC invalidated for %s" % self.context.student_id 1067 1067 # Here we know that the ac is in state initialized so we do not 1068 # expect an exception 1069 invalidate_accesscode(pin,comment) 1068 # expect an exception, but the owner might be different 1069 if not invalidate_accesscode(pin,comment,self.context.student_id): 1070 self.flash('You are not the owner of this access code.') 1071 return 1070 1072 self.context.clr_code = pin 1071 1073 IWorkflowInfo(self.context).fireTransition('start_clearance') -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r6922 r6927 124 124 datetime.now(), 'some_userid', 'CLR', 9.99, 5) 125 125 pins = pin_container[pin_container.keys()[0]].values() 126 self.clrpins = [x.representation for x in pins]127 self.existing_clr pin = self.clrpins[0]128 self.existing_clrpin 126 pins[0].owner = u'Hans Wurst' 127 self.existing_clrac = pins[0] 128 self.existing_clrpin = pins[0].representation 129 129 parts = self.existing_clrpin.split('-')[1:] 130 130 self.existing_clrseries, self.existing_clrnumber = parts … … 584 584 self.browser.getControl(name="ac_series").value = self.existing_clrseries 585 585 self.browser.getControl(name="ac_number").value = self.existing_clrnumber 586 # Owner is Hans Wurst, AC can't be invalidated 587 self.browser.getControl("Start clearance now").click() 588 self.assertMatches('...You are not the owner of this access code...', 589 self.browser.contents) 590 # Set the correct owner 591 self.existing_clrac.owner = self.student_id 586 592 self.browser.getControl("Start clearance now").click() 587 593 self.assertMatches('...Clearance process has been started...',
Note: See TracChangeset for help on using the changeset viewer.