Changeset 7497 for main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Timestamp:
- 21 Jan 2012, 11:55:44 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/students/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/sample_student_data_migration.csv
r7357 r7497 1 student_id,firstname,lastname,reg_number,date_of_birth,matric_number,email,phone 2 A123456,Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234 3 B123456,Aaren,Finau,2,1990-01-03,100001,aa@aa.ng,1234 4 C123456,Aaren,Berson,3,1990-01-04,100002,aa@aa.ng,1234 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 -
main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
r7463 r7497 682 682 # Prepare a csv file for students 683 683 open('students.csv', 'wb').write( 684 """firstname,lastname,reg_number,date_of_birth,matric_number,email,phone 685 Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234 686 Claus,Finau,2,1990-01-03,100001,aa@aa.ng,1234 687 Brit,Berson,3,1990-01-04,100001,aa@aa.ng,1234 684 """firstname,lastname,reg_number,date_of_birth,matric_number,email,phone,password 685 Aaren,Pieri,1,1990-01-02,100000,aa@aa.ng,1234,mypwd1 686 Claus,Finau,2,1990-01-03,100001,aa@aa.ng,1234,mypwd1 687 Brit,Berson,3,1990-01-04,100001,aa@aa.ng,1234,mypwd1 688 688 """) 689 689 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') … … 739 739 # The students are properly indexed and we can 740 740 # thus find a student in the department 741 self.browser.open(self. container_path)741 self.browser.open(self.manage_container_path) 742 742 self.browser.getControl(name="searchtype").value = ['depcode'] 743 743 self.browser.getControl(name="searchterm").value = 'dep1' 744 744 self.browser.getControl("Search").click() 745 745 self.assertTrue('Aaren Pieri' in self.browser.contents) 746 # We can search for a new student by name ... 747 self.browser.getControl(name="searchtype").value = ['fullname'] 748 self.browser.getControl(name="searchterm").value = 'Claus' 749 self.browser.getControl("Search").click() 750 self.assertTrue('Claus Finau' in self.browser.contents) 751 # ... and check if the imported password has been properly set 752 ctrl = self.browser.getControl(name='entries') 753 value = ctrl.options[0] 754 claus = self.app['students'][value] 755 self.assertTrue(IUserAccount(claus).checkPassword('mypwd1')) 746 756 return 747 757
Note: See TracChangeset for help on using the changeset viewer.