Skip to content
Browse files

reproduce timeout=None bug

  • Loading branch information...
1 parent 1098ac8 commit 7075e1742529f7de53dd794e9ded0baaa3584135 @mmerickel mmerickel committed Feb 27, 2014
Showing with 9 additions and 0 deletions.
  1. +9 −0 pyramid/tests/test_session.py
View
9 pyramid/tests/test_session.py
@@ -52,6 +52,15 @@ def test_timeout(self):
session = self._makeOne(request, timeout=1)
self.assertEqual(dict(session), {})
+ def test_timeout_never(self):
+ import time
+ request = testing.DummyRequest()
+ LONG_TIME = 31536000
+ cookieval = self._serialize((time.time() + LONG_TIME, 0, {'state': 1}))
+ request.cookies['session'] = cookieval
+ session = self._makeOne(request, timeout=None)
+ self.assertEqual(dict(session), {'state': 1})
+
def test_changed(self):
request = testing.DummyRequest()
session = self._makeOne(request)

0 comments on commit 7075e17

Please sign in to comment.
Something went wrong with that request. Please try again.