Changeset 8667 for main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Timestamp:
- 11 Jun 2012, 05:24:10 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
r8637 r8667 54 54 grok.provides(IApplicant) 55 55 56 create_names = [ 57 'firstname', 'lastname', 58 'sex', 'date_of_birth', 59 'email', 'phone' 60 ] 61 56 62 def __init__(self): 57 63 super(Applicant, self).__init__() … … 113 119 # Add student object 114 120 try: 115 student.firstname = self.firstname 116 student.lastname = self.lastname 117 student.sex = self.sex 118 student.date_of_birth = self.date_of_birth 119 student.email = self.email 120 student.phone = self.phone 121 for name in self.create_names: 122 setattr(student, name, getattr(self, name, None)) 121 123 except RequiredMissing, err: 122 124 return False, _('RequiredMissing: %s' % err) -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicantcopier.py
r8637 r8667 78 78 # Student is in state admitted 79 79 self.assertEqual(student.state, 'admitted') 80 # Attributes properly set? 81 self.assertEqual(student.email, 'xx@yy.zz') 82 self.assertEqual(student.firstname, 'John') 83 self.assertEqual(student.lastname, 'Tester') 80 84 # Check if passport image has been copied 81 85 storage = getUtility(IExtFileStore)
Note: See TracChangeset for help on using the changeset viewer.