Exemplo n.º 1
0
    def retrieves_a_pickled_object_from_session(self):
        driver = RedisDriver(dict(db=0))

        foo = dict(foo='bar')

        self.client.set('session-id', pickle.dumps(foo))

        result = driver.get('session-id')

        self.assertEqual(result, foo)
Exemplo n.º 2
0
    def retrieves_a_pickled_object_from_session(self):
        driver = RedisDriver(dict(db=0))

        foo = dict(foo='bar')

        self.client.set('session-id', pickle.dumps(foo))

        result = driver.get('session-id')

        self.assertEqual(result, foo)
Exemplo n.º 3
0
    def starts_with_max_connections(self):
        driver = RedisDriver(dict(db=0, max_connections=123))
        driver.get('some session')

        self.assertEqual(driver.client.connection_pool.max_connections, 123)
Exemplo n.º 4
0
    def starts_with_max_connections(self):
        driver = RedisDriver(dict(db=0, max_connections=123))
        driver.get('some session')

        self.assertEqual(driver.client.connection_pool.max_connections, 123)