def test_tick_custom(self): from pyramid_sockjs import Session session = Session('id', timedelta(seconds=20)) self.now = self.now + timedelta(hours=1) session.tick(timedelta(seconds=30)) self.assertEqual(session.expires, self.now + timedelta(seconds=30))
def test_tick(self): from pyramid_sockjs import Session session = Session('id') self.now = self.now + timedelta(hours=1) session.tick() self.assertEqual(session.expires, self.now + session.timeout)