Beispiel #1
0
    def makes_session_expire_in_one_day_in_the_client(self):
        driver = MemcachedDriver({'servers': ('localhost:11211', )})

        foo = dict(foo='bar')

        test_case = self

        class StubClient(object):
            def set(self, session_id, pickled_session, expiration):
                test_case.assertEqual(expiration,
                                      MemcachedDriver.EXPIRE_SECONDS)

        driver.client = StubClient()

        driver.set('session-id', foo)
Beispiel #2
0
    def makes_session_expire_in_one_day_in_the_client(self):
        driver = MemcachedDriver({
            'servers': ('localhost:11211',)
        })

        foo = dict(foo='bar')

        test_case = self

        class StubClient(object):
            def set(self, session_id, pickled_session, expiration):
                test_case.assertEqual(expiration, MemcachedDriver.EXPIRE_SECONDS)

        driver.client = StubClient()

        driver.set('session-id', foo)