Fix memcached tests for py3

This commit is contained in:
Honza Kral
2013-08-25 18:01:45 +02:00
parent 39bcd81957
commit 38ba61d511
4 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ try:
except ImportError:
from urllib.parse import urlencode
from ..exceptions import TransportError, ConnectionError
from ..exceptions import TransportError, ConnectionError, ImproperlyConfigured
from .pooling import PoolingConnection
class MemcachedConnection(PoolingConnection):
+1 -1
View File
@@ -12,7 +12,7 @@ try:
except ImportError:
THRIFT_AVAILABLE = False
from ..exceptions import ConnectionError
from ..exceptions import ConnectionError, ImproperlyConfigured
from .pooling import PoolingConnection
class ThriftConnection(PoolingConnection):
+4 -1
View File
@@ -1,4 +1,7 @@
__all__ = ['ElastiSearchException', 'SerializationError', 'TransportError', 'NotFoundError']
__all__ = ['ImproperlyConfigured', 'ElastiSearchException', 'SerializationError', 'TransportError', 'NotFoundError']
class ImproperlyConfigured(Exception):
pass
class ElastiSearchException(Exception):
pass
@@ -9,6 +9,10 @@ from unittest import SkipTest
class TestMemcachedConnection(ElasticTestCase):
def setUp(self):
try:
import pylibmc
except ImportError:
raise SkipTest("No pylibmc.")
super(TestMemcachedConnection, self).setUp()
nodes = self.client.cluster.node_info()
for node_id, node_info in nodes["nodes"].items():