- Timestamp:
- 27 Apr 2012, 05:28:01 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.