Changeset 8354 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 4 May 2012, 23:26:58 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r8340 r8354 29 29 30 30 from waeup.kofa.app import University 31 from waeup.kofa.university.faculty import Faculty 32 from waeup.kofa.university.department import Department 31 from waeup.kofa.interfaces import IBatchProcessor, FatalCSVError, IUserAccount 33 32 from waeup.kofa.students.batching import ( 34 33 StudentProcessor, StudentStudyCourseProcessor, … … 38 37 from waeup.kofa.students.studylevel import StudentStudyLevel, CourseTicket 39 38 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase 40 from waeup.kofa.interfaces import IBatchProcessor, FatalCSVError 39 from waeup.kofa.university.faculty import Faculty 40 from waeup.kofa.university.department import Department 41 41 42 42 43 STUDENT_SAMPLE_DATA = open( … … 328 329 assert len(self.app['students'].keys()) == 5 329 330 self.assertEqual(self.app['students']['X666666'].reg_number,'1') 330 self.assertEqual(self.app['students']['X666666'].state,'courses validated') 331 self.assertEqual( 332 self.app['students']['X666666'].state, 'courses validated') 331 333 shutil.rmtree(os.path.dirname(fin_file)) 332 334 … … 412 414 '5,John,E123456,x,aa@aa.ng,1234,,1990-01-06,Kennedy,,100004,sex: Invalid value\r\n' 413 415 ) 414 self.assertTrue('A123456' in self.app['students'].keys()) 415 self.assertEqual(self.app['students']['A123456'].state,'clearance started') 416 self.assertEqual(self.app['students']['A123456'].date_of_birth, 417 datetime.date(1990, 1, 2)) 418 self.assertFalse(self.app['students']['A123456'].clearance_locked) 419 self.assertEqual(self.app['students']['B123456'].state,'cleared') 420 self.assertEqual(self.app['students']['B123456'].date_of_birth, 421 datetime.date(1990, 1, 3)) 422 self.assertTrue(self.app['students']['B123456'].clearance_locked) 423 history = ' '.join(self.app['students']['A123456'].history.messages) 416 students = self.app['students'] 417 self.assertTrue('A123456' in students.keys()) 418 self.assertEqual(students['A123456'].state, 'clearance started') 419 self.assertEqual(students['A123456'].date_of_birth, 420 datetime.date(1990, 1, 2)) 421 self.assertFalse(students['A123456'].clearance_locked) 422 self.assertEqual(students['B123456'].state, 'cleared') 423 self.assertEqual(students['B123456'].date_of_birth, 424 datetime.date(1990, 1, 3)) 425 self.assertTrue(students['B123456'].clearance_locked) 426 history = ' '.join(students['A123456'].history.messages) 424 427 self.assertTrue( 425 428 "State 'clearance started' set by system" in history) 426 429 # state was empty and student is thus in state created 427 self.assertEqual(self.app['students']['F123456'].state,'created') 430 self.assertEqual(students['F123456'].state,'created') 431 # passwords were set correctly 432 self.assertEqual( 433 IUserAccount(students['A123456']).checkPassword('mypw1'), True) 434 self.assertEqual( 435 IUserAccount(students['C123456']).checkPassword('mypw1'), True) 428 436 shutil.rmtree(os.path.dirname(fin_file)) 429 437
Note: See TracChangeset for help on using the changeset viewer.