Changeset 9169 for main/waeup.kofa/branches/uli-async-update/src/waeup/kofa/applicants/tests/test_applicantcopier.py
- Timestamp:
- 10 Sep 2012, 11:05:07 (12 years ago)
- Location:
- main/waeup.kofa/branches/uli-async-update
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/uli-async-update
- Property svn:mergeinfo changed
-
main/waeup.kofa/branches/uli-async-update/src/waeup/kofa/applicants/tests/test_applicantcopier.py
r8667 r9169 21 21 import os 22 22 import grok 23 from datetime import datetime 23 24 from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState 24 25 from zope.event import notify … … 28 29 from waeup.kofa.interfaces import IExtFileStore, IFileStoreNameChooser 29 30 from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup 31 32 session = datetime.now().year - 2 30 33 31 34 class ApplicantCopierFunctionalTests(ApplicantsFullSetup): … … 67 70 self.browser.getControl(name="form.course_admitted").value = ['CERT1'] 68 71 self.browser.getControl("Save").click() 72 # Maybe the certificate has meanwhile been removed 73 del self.app['faculties']['fac1']['dep1'].certificates['CERT1'] 74 (success, msg) = self.applicant.createStudent() 75 self.assertFalse(success) 76 self.assertTrue('ConstraintNotSatisfied: CERT1' in msg) 77 # Ok, lets add the certificate and try again 78 self.app['faculties']['fac1']['dep1'].certificates.addCertificate( 79 self.certificate) 69 80 (success, msg) = self.applicant.createStudent() 70 81 self.assertTrue('created' in msg) … … 82 93 self.assertEqual(student.firstname, 'John') 83 94 self.assertEqual(student.lastname, 'Tester') 95 # student_id set in application record? 96 self.assertEqual(self.applicant.student_id, student.student_id) 84 97 # Check if passport image has been copied 85 98 storage = getUtility(IExtFileStore) … … 110 123 # Has the student studycourse the correct attributes? 111 124 self.assertEqual(student['studycourse'].certificate.code, 'CERT1') 112 self.assertEqual(student['studycourse'].entry_session, 2009)125 self.assertEqual(student['studycourse'].entry_session, session) 113 126 self.assertEqual(student['studycourse'].entry_mode, 'ug_ft') 114 self.assertEqual(student['studycourse'].current_session, 2009)127 self.assertEqual(student['studycourse'].current_session, session) 115 128 self.assertEqual(student['studycourse'].current_level, 100) 116 129
Note: See TracChangeset for help on using the changeset viewer.