Changeset 6938 for main/waeup.sirp/trunk
- Timestamp:
- 25 Oct 2011, 05:41:34 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r6935 r6938 563 563 # Students can access their own objects 564 564 # and can perform actions 565 student = self.app['students'][self.student_id] 566 IWorkflowInfo(student).fireTransition('admit') 565 IWorkflowInfo(self.student).fireTransition('admit') 567 566 self.browser.open(self.login_path) 568 567 self.browser.getControl(name="form.login").value = self.student_id … … 614 613 self.browser.contents) 615 614 # ... and must be transferred first 616 IWorkflowInfo(s tudent).fireTransition('clear')617 IWorkflowInfo(s tudent).fireTransition('pay_first_school_fee')615 IWorkflowInfo(self.student).fireTransition('clear') 616 IWorkflowInfo(self.student).fireTransition('pay_first_school_fee') 618 617 # Now students can add the current study level 619 618 self.browser.getLink("Study Course").click() … … 654 653 655 654 def test_manage_payments(self): 656 657 655 # Set up SessionConfiguration object 658 656 configuration = SessionConfiguration() … … 693 691 694 692 # Managers can open the callback view which simulates a valid callback 693 self.assertEqual(len(self.app['accesscodes']['CLR-0']),0) 695 694 ctrl = self.browser.getControl(name='val_id') 696 695 value = ctrl.options[0] … … 702 701 </td>...''' 703 702 self.assertMatches(expected,self.browser.contents) 703 # The new CLR-0 pin has been created 704 self.assertEqual(len(self.app['accesscodes']['CLR-0']),1) 705 pin = self.app['accesscodes']['CLR-0'].keys()[0] 706 ac = self.app['accesscodes']['CLR-0'][pin] 707 ac.owner = self.student_id 708 # The new CLR-0 pin can be used for starting clearance 709 IWorkflowInfo(self.student).fireTransition('admit') 710 self.browser.open(self.student_path + '/start_clearance') 711 parts = pin.split('-')[1:] 712 clrseries, clrnumber = parts 713 self.browser.getControl(name="ac_series").value = clrseries 714 self.browser.getControl(name="ac_number").value = clrnumber 715 self.browser.getControl("Start clearance now").click() 716 self.assertMatches('...Clearance process has been started...', 717 self.browser.contents) 718
Note: See TracChangeset for help on using the changeset viewer.