From 56777ee4046617c81bf9cc5ccc49e9950ec25f24 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Tue, 7 Jun 2011 17:56:04 +0100 Subject: [PATCH] Unit tests passing --- kombu/tests/test_transport_pyredis.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/kombu/tests/test_transport_pyredis.py b/kombu/tests/test_transport_pyredis.py index 795edc3f..e0b31d42 100644 --- a/kombu/tests/test_transport_pyredis.py +++ b/kombu/tests/test_transport_pyredis.py @@ -36,6 +36,7 @@ class ResponseError(Exception): class Client(object): queues = {} sets = {} + shard_hint = None def __init__(self, db=None, port=None, **kwargs): self.port = port @@ -43,6 +44,7 @@ class Client(object): self._called = [] self._connection = None self.bgsave_raises_ResponseError = False + self.connection = self._sconnection(self) def bgsave(self): self._called.append("BGSAVE") @@ -134,13 +136,15 @@ class Client(object): return {"foo": 1} def pubsub(self, *args, **kwargs): - return self + connection = self.connection - @property - def connection(self): - if self._connection is None: - self._connection = self._sconnection(self) - return self._connection + class ConnectionPool(object): + + def get_connection(self, *args, **kwargs): + return connection + self.connection_pool = ConnectionPool() + + return self class Pipeline(object):