Changeset 7513 for main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Timestamp:
- 25 Jan 2012, 17:47:23 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/sample_student_data.csv
r7357 r7513 1 firstname,lastname,reg_number,date_of_birth,matric_number,email,phone 1 firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,reg_state 2 2 Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234 3 Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234 4 Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234 3 Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,admitted 4 Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234,cleared 5 John,Wolter,4,1990-01-04,100003,aa@aa.ng,1234,nonsense -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/sample_student_data_migration.csv
r7497 r7513 1 student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password 2 A123456,Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,mypw1 3 B123456,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,mypw1 4 C123456,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234,mypw1 1 student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password,reg_state 2 A123456,Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,mypw1,school fee paid 3 B123456,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234,mypw1,cleared 4 C123456,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234,mypw1,admitted 5 D123456,John,Wolter,4,1990-01-04,100003,aa@aa.ng,1234,mypw1,nonsense -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_batching.py
r7357 r7513 162 162 num, num_warns, fin_file, fail_file = self.importer.doImport( 163 163 self.csv_file, STUDENT_HEADER_FIELDS) 164 self.assertEqual(num_warns, 0)164 self.assertEqual(num_warns,1) 165 165 assert len(self.app['students'].keys()) == 4 166 166 shutil.rmtree(os.path.dirname(fin_file)) … … 196 196 num, num_warns, fin_file, fail_file = self.importer.doImport( 197 197 self.csv_file_migration, STUDENT_HEADER_FIELDS_MIGRATION) 198 self.assertEqual(num_warns, 0)198 self.assertEqual(num_warns,1) 199 199 assert len(self.app['students'].keys()) == 4 200 200 self.assertTrue('A123456' in self.app['students'].keys()) 201 self.assertEqual(self.app['students']['A123456'].state,'school fee paid') 201 202 shutil.rmtree(os.path.dirname(fin_file)) 202 203 -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r7497 r7513 31 31 from zope.securitypolicy.interfaces import IPrincipalRoleManager 32 32 from zope.testbrowser.testing import Browser 33 from hurry.workflow.interfaces import IWorkflowInfo 33 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState 34 34 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase 35 35 from waeup.sirp.app import University … … 769 769 prmlocal = IPrincipalRoleManager(department) 770 770 prmlocal.assignRoleToPrincipal('waeup.local.ClearanceOfficer', 'mrclear') 771 IWorkflowInfo(self.student).fireTransition('admit') 772 IWorkflowInfo(self.student).fireTransition('start_clearance') 771 IWorkflowState(self.student).setState('clearance started') 773 772 # Login as clearance officer 774 773 self.browser.open(self.login_path) … … 857 856 prmlocal = IPrincipalRoleManager(cert) 858 857 prmlocal.assignRoleToPrincipal('waeup.local.CourseAdviser100', 'mrsadvise') 859 IWorkflowInfo(self.student).fireTransition('admit') 860 IWorkflowInfo(self.student).fireTransition('start_clearance') 861 IWorkflowInfo(self.student).fireTransition('request_clearance') 862 IWorkflowInfo(self.student).fireTransition('clear') 863 IWorkflowInfo(self.student).fireTransition('pay_first_school_fee') 858 IWorkflowState(self.student).setState('school fee paid') 864 859 # Login as course adviser 865 860 self.browser.open(self.login_path)
Note: See TracChangeset for help on using the changeset viewer.