Exemplo n.º 1
0
    def test_use_connection(self):
        r = redis.Redis()
        redcache.connection.use_connection(r)
        connection = redcache.connection.get_current_connection()

        assert connection == r
        assert connection.echo('I work') == 'I work'
Exemplo n.º 2
0
    def test_connect(self):
        redcache.connection.use_connection()
        connection = redcache.connection.get_current_connection()

        assert connection.echo('I work') == 'I work'