Changeset 8291 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 27 Apr 2012, 05:28:01 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data.csv
r8290 r8291 1 application_number,container_code,reg_number,firstname,lastname,date_of_birth,email,course1,sex,middlename 2 1234,dp2011,1001,Aaren,Pieri,1990-01-02,xx@yy.zz,CERT1,m,Peter 3 2345,dp2011,1002,Aaren,Finau,1990-01-03,xx@yy.zz,CERT1,m,Claus 4 ,dp2011,1003,Aaren,Berson,1990-01-04,xx@yy.zz,CERT1,m,Alfons 1 application_number,container_code,reg_number,firstname,lastname,date_of_birth,email,course1,sex,middlename,password 2 1234,dp2011,1001,Aaren,Pieri,1990-01-02,xx@yy.zz,CERT1,m,Peter,mypwd1 3 2345,dp2011,1002,Aaren,Finau,1990-01-03,xx@yy.zz,CERT1,m,Claus, 4 ,dp2011,1003,Aaren,Berson,1990-01-04,xx@yy.zz,CERT1,m,Alfons, -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_faulty_applicant_data.csv
r8290 r8291 1 application_number,container_code,reg_number,firstname,lastname,date_of_birth,email,course1,sex,middlename 2 ,dp2011,1001,Aaren,Pieri,01/02/1990,xx@yy.zz,CERT1,m,Claus 1 application_number,container_code,reg_number,firstname,lastname,date_of_birth,email,course1,sex,middlename,password 2 ,dp2011,1001,Aaren,Pieri,01/02/1990,xx@yy.zz,CERT1,m,Claus, -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py
r8290 r8291 36 36 from waeup.kofa.university.department import Department 37 37 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase 38 from waeup.kofa.interfaces import IBatchProcessor 38 from waeup.kofa.interfaces import IBatchProcessor, IUserAccount 39 39 40 40 … … 316 316 # Confirm that middlename has not been deleted. 317 317 container = self.app['applicants']['dp2011'] 318 for key in container.keys(): 319 if container[key].lastname == 'Pieri': 320 applicant = container[key] 321 break 322 self.assertEqual(applicant.middlename, 'Peter') 318 self.assertEqual(container['1234'].middlename, 'Peter') 323 319 # state of Pieri has not changed 324 320 self.assertEqual(container['1234'].state,'initialized') 325 321 # state of Finau has changed 326 322 self.assertEqual(container['2345'].state,'admitted') 323 # password of Pieri has been set 324 self.assertTrue(IUserAccount(container['1234']).checkPassword('mypwd1')) 325 # password of Finau is still unset 326 self.assertEqual(IUserAccount(container['2345']).password,'') 327 327 shutil.rmtree(os.path.dirname(fin_file)) 328 328 # Now we import another file which clears all middlename attributes. … … 330 330 self.csv_file_update2, APPLICANT_HEADER_FIELDS_UPDATE, 'update') 331 331 self.assertEqual(num_warns,0) 332 assert applicant.middlename is None332 assert container['1234'].middlename is None 333 333 shutil.rmtree(os.path.dirname(fin_file)) 334 334
Note: See TracChangeset for help on using the changeset viewer.