Changeset 10475 for main/waeup.cas/trunk/waeup/cas/tests
- Timestamp:
- 8 Aug 2013, 10:09:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.cas/trunk/waeup/cas/tests/test_authenticators.py
r10474 r10475 62 62 inst1 = dict( 63 63 url = 'http://localhost:6666/app', 64 marker = '^M[0-9]+ ',64 marker = '^M[0-9]+$', 65 65 ) 66 66 ) … … 76 76 # all options have sensible defaults 77 77 auth = KofaAuthenticator() 78 assert auth.backends is None78 assert auth.backends == {} 79 79 80 80 def test_options(self): 81 81 # we can pass options 82 auth = KofaAuthenticator(auth_backends= BACKENDS)82 auth = KofaAuthenticator(auth_backends=str(BACKENDS)) 83 83 assert auth.backends == BACKENDS 84 auth = KofaAuthenticator(auth_backends='{"foo": {"url": "bar"}}') 85 assert auth.backends['foo']['marker'] == '.+' 86 self.assertRaises( 87 ValueError, KofaAuthenticator, auth_backends='not-a-py-expr') 88 self.assertRaises( 89 ValueError, KofaAuthenticator, auth_backends='"Not a dict"') 90 self.assertRaises( 91 ValueError, KofaAuthenticator, 92 auth_backends='{"foo": "not-a-dict"}') 93 self.assertRaises( 94 ValueError, KofaAuthenticator, 95 auth_backends='{"foo": {"no-url-key": "bar"}}') 96 self.assertRaises( 97 ValueError, KofaAuthenticator, 98 auth_backends='{"foo": {"url": "bar", "marker": "inv_re)"}}') 84 99 85 100 def test_paste_deploy_options(self):
Note: See TracChangeset for help on using the changeset viewer.