Changeset 6452 for main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests
- Timestamp:
- 22 Jun 2011, 13:51:55 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/tests/test_authentication.py
r6412 r6452 50 50 51 51 class FakeAccessCode(object): 52 def __init__(self, repr, inv_date=None, disabled=False): 53 self.used = inv_date is not None 52 def __init__(self, repr, status = 'initialized'): 54 53 self.representation = repr 55 self.disabled = disabled 56 57 class FakeInvAccessCode(object): 58 invalidation_date = True 54 self.status = status 59 55 60 56 class FakeApplication(object): … … 71 67 'APP-44444': FakeApplication(), 72 68 'APP-55555': FakeApplication(u'APP-OTHER'), 73 }, 74 'JAMB': { 75 'JAMB1': FakeApplication(), 76 'JAMB2': FakeApplication(u'APP-12345'), 77 'JAMB3': FakeApplication(u'APP-54321'), 78 'JAMB4': FakeApplication(u'APP-44444'), 69 'APP-77777': FakeApplication(u'APP-77777'), 79 70 }, 80 71 }, … … 82 73 'APP': FakeBatch({ 83 74 'APP-12345': FakeAccessCode('APP-12345'), 84 'APP-54321': FakeAccessCode('APP-54321', True),75 'APP-54321': FakeAccessCode('APP-54321', 'used'), 85 76 'APP-11111': FakeAccessCode('APP-11111'), 86 77 'APP-22222': FakeAccessCode('APP-22222'), 87 'APP-33333': FakeAccessCode('APP-33333', True),88 'APP-44444': FakeAccessCode('APP-44444', True),89 'APP-55555': FakeAccessCode('APP-55555', True),90 'APP-66666': FakeAccessCode('APP-66666', True, False),91 'APP-77777': FakeAccessCode('APP-77777', False, False),78 'APP-33333': FakeAccessCode('APP-33333', 'used'), 79 'APP-44444': FakeAccessCode('APP-44444', 'used'), 80 'APP-55555': FakeAccessCode('APP-55555', 'used'), 81 'APP-66666': FakeAccessCode('APP-66666', 'disabled'), 82 'APP-77777': FakeAccessCode('APP-77777', 'disabled'), 92 83 }) 93 84 } … … 166 157 dict(accesscode='APP-77777')) 167 158 assert result is None 159 168 160 return 169 161
Note: See TracChangeset for help on using the changeset viewer.