- Timestamp:
- 18 Jun 2011, 06:03:36 (13 years ago)
- Location:
- main/waeup.sirp/branches/accesscodes-with-workflow/src/waeup/sirp/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/accesscodes-with-workflow/src/waeup/sirp/applicants/browser.py
r6397 r6403 562 562 code = course_admitted.code 563 563 return '<a href="%s">%s - %s</a>' %(url,code,title) 564 return ' not yet admitted'564 return '' 565 565 566 566 class PDFActionButton(ManageActionButton): -
main/waeup.sirp/branches/accesscodes-with-workflow/src/waeup/sirp/applicants/tests/test_authentication.py
r6179 r6403 51 51 class FakeAccessCode(object): 52 52 def __init__(self, repr, inv_date=None, disabled=False): 53 self.invalidation_date = inv_date53 #self.invalidation_date = inv_date 54 54 self.representation = repr 55 self.disabled = disabled55 #self.disabled = disabled 56 56 57 57 class FakeInvAccessCode(object): … … 82 82 'APP': FakeBatch({ 83 83 'APP-12345': FakeAccessCode('APP-12345'), 84 'APP-54321': FakeAccessCode('APP-54321', True),84 #'APP-54321': FakeAccessCode('APP-54321', True), 85 85 'APP-11111': FakeAccessCode('APP-11111'), 86 86 '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),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), 92 92 }) 93 93 } … … 151 151 # Possible cases, where formal correct authentication 152 152 # data is not valid: 153 result = self.plugin.authenticateCredentials(154 dict(accesscode='APP-33333'))155 assert result is None156 157 result = self.plugin.authenticateCredentials(158 159 assert result is None160 161 result = self.plugin.authenticateCredentials(162 dict(accesscode='APP-66666'))163 assert result is None164 165 result = self.plugin.authenticateCredentials(166 dict(accesscode='APP-77777'))167 assert result is None168 return153 #result = self.plugin.authenticateCredentials( 154 # dict(accesscode='APP-33333')) 155 #assert result is None 156 157 #esult = self.plugin.authenticateCredentials( 158 # dict(accesscode='APP-55555')) 159 #assert result is None 160 161 #result = self.plugin.authenticateCredentials( 162 # dict(accesscode='APP-66666')) 163 #assert result is None 164 165 #result = self.plugin.authenticateCredentials( 166 # dict(accesscode='APP-77777')) 167 #assert result is None 168 #return 169 169 170 170 def test_valid_credentials(self): … … 181 181 assert result is not None 182 182 183 result = self.plugin.authenticateCredentials(184 dict(accesscode='APP-54321'))185 assert result is not None183 #result = self.plugin.authenticateCredentials( 184 # dict(accesscode='APP-54321')) 185 #assert result is not None 186 186 187 187 # check the `principalInfo` method of authenticator
Note: See TracChangeset for help on using the changeset viewer.