Пример #1
0
    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))
Пример #2
0
    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))
Пример #3
0
    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)
Пример #4
0
    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)