diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-02-03 02:51:24 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-02-03 02:51:24 +0000 |
| commit | 5ba0636b83277c24c48e81427a176541266cd30e (patch) | |
| tree | 438d0e506d4f735180fefac9bc7e271e236b0584 /repoze/bfg/tests/test_zcml.py | |
| parent | b538144a028116b3d4ed5bffa5ca30edaf32f191 (diff) | |
| download | pyramid-5ba0636b83277c24c48e81427a176541266cd30e.tar.gz pyramid-5ba0636b83277c24c48e81427a176541266cd30e.tar.bz2 pyramid-5ba0636b83277c24c48e81427a176541266cd30e.zip | |
Bug Fixes
---------
- Ensure that ``secure`` flag for AuthTktAuthenticationPolicy
constructor does what it's documented to do (merge Daniel Holth's
fancy-cookies-2 branch).
New Features
------------
- Add ``path`` and ``http_only`` options to
AuthTktAuthenticationPolicy constructor (merge Daniel Holth's
fancy-cookies-2 branch).
Diffstat (limited to 'repoze/bfg/tests/test_zcml.py')
| -rw-r--r-- | repoze/bfg/tests/test_zcml.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/repoze/bfg/tests/test_zcml.py b/repoze/bfg/tests/test_zcml.py index 1784a6aa8..9148640ca 100644 --- a/repoze/bfg/tests/test_zcml.py +++ b/repoze/bfg/tests/test_zcml.py @@ -423,7 +423,7 @@ class TestAuthTktAuthenticationPolicyDirective(unittest.TestCase): self._callFUT(context, 'sosecret', callback=callback, cookie_name='repoze.bfg.auth_tkt', secure=True, include_ip=True, timeout=100, - reissue_time=60) + reissue_time=60, http_only=True, path="/sub/") actions = context.actions self.assertEqual(len(actions), 1) regadapt = actions[0] @@ -431,6 +431,8 @@ class TestAuthTktAuthenticationPolicyDirective(unittest.TestCase): self.assertEqual(regadapt['callable'], None) self.assertEqual(regadapt['args'], ()) policy = reg.getUtility(IAuthenticationPolicy) + self.assertEqual(policy.cookie.path, '/sub/') + self.assertEqual(policy.cookie.http_only, True) self.assertEqual(policy.cookie.secret, 'sosecret') self.assertEqual(policy.callback, callback) @@ -444,7 +446,8 @@ class TestAuthTktAuthenticationPolicyDirective(unittest.TestCase): context, 'sosecret', callback=callback, cookie_name='repoze.bfg.auth_tkt', secure=True, include_ip=True, timeout=100, - reissue_time=500) + reissue_time=500, http_only=True, + path="/cgi-bin/bfg.cgi/") class TestACLAuthorizationPolicyDirective(unittest.TestCase): def setUp(self): |
