Permalink
Browse files

reproduce reissue_time=None bug

  • Loading branch information...
1 parent 8f4fbd8 commit 9549f66c78f18e4a041e96cbc78e7aa8d75fb4fe @mmerickel mmerickel committed Feb 27, 2014
Showing with 16 additions and 0 deletions.
  1. +16 −0 pyramid/tests/test_session.py
@@ -288,6 +288,14 @@ def test_reissue_not_triggered(self):
self.assertEqual(session['state'], 1)
self.assertFalse(session._dirty)
+ def test_reissue_never(self):
+ request = testing.DummyRequest()
+ cookieval = self._serialize((0, 0, {'state': 1}))
+ request.cookies['session'] = cookieval
+ session = self._makeOne(request, reissue_time=None, timeout=None)
+ self.assertEqual(session['state'], 1)
+ self.assertFalse(session._dirty)
+
class TestSignedCookieSession(SharedCookieSessionTests, unittest.TestCase):
def _makeOne(self, request, **kw):
from pyramid.session import SignedCookieSessionFactory
@@ -314,6 +322,14 @@ def test_reissue_not_triggered(self):
self.assertEqual(session['state'], 1)
self.assertFalse(session._dirty)
+ def test_reissue_never(self):
+ request = testing.DummyRequest()
+ cookieval = self._serialize((0, 0, {'state': 1}))
+ request.cookies['session'] = cookieval
+ session = self._makeOne(request, reissue_time=None, timeout=None)
+ self.assertEqual(session['state'], 1)
+ self.assertFalse(session._dirty)
+
def test_custom_salt(self):
import time
request = testing.DummyRequest()

0 comments on commit 9549f66

Please sign in to comment.