Changeset 13213
- Timestamp:
- 23 Aug 2015, 10:03:46 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
r13080 r13213 83 83 84 84 @property 85 def record_used(self): 86 if (self.password, 87 self.firstname, 88 self.lastname, 89 self.email) != (None, None, None, None): 90 return True 91 return False 92 93 @property 85 94 def container_code(self): 86 95 try: … … 227 236 email = index.Field(attribute='email') 228 237 state = index.Field(attribute='state') 238 record_used = index.Field(attribute='record_used') 229 239 230 240 class ApplicantFactory(grok.GlobalUtility): -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r13211 r13213 327 327 """ 328 328 state = Attribute('Application state of an applicant') 329 record_used = Attribute('True if password or any required field has been set') 329 330 history = Attribute('Object history, a list of messages') 330 331 display_fullname = Attribute('The fullname of an applicant') -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicant.py
r10092 r13213 191 191 return 192 192 193 def test_record_used(self): 194 self.applicant.password is None 195 self.applicant.firstname is None 196 self.applicant.lastname is None 197 self.applicant.email is None 198 self.applicant.record_used is False 199 self.applicant.firstname is 'Anna' 200 self.applicant.record_used is True 201 193 202 class ApplicantFactoryTest(FunctionalTestCase): 194 203
Note: See TracChangeset for help on using the changeset viewer.