summaryrefslogtreecommitdiff
path: root/test/testutil.py
diff options
context:
space:
mode:
authorBruno ReniƩ <brutasse@gmail.com>2014-08-29 09:44:41 +0200
committerBruno ReniƩ <brutasse@gmail.com>2014-08-29 09:44:41 +0200
commit27464596d861df2218e744606ffe5c206bbf5ee7 (patch)
tree709e66af681f27ac4caae8d82103150e5b5e6b60 /test/testutil.py
parent59918a3343dcc6d59c9d5853a785e1528e008ff1 (diff)
downloadkafka-python-27464596d861df2218e744606ffe5c206bbf5ee7.tar.gz
Encode topic directly
Diffstat (limited to 'test/testutil.py')
-rw-r--r--test/testutil.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/testutil.py b/test/testutil.py
index 980a683..7c8c802 100644
--- a/test/testutil.py
+++ b/test/testutil.py
@@ -60,11 +60,12 @@ class KafkaIntegrationTestCase(unittest.TestCase):
if not self.topic:
self.topic = "%s-%s" % (self.id()[self.id().rindex(".") + 1:], random_string(10).decode('utf-8'))
+ self.topic = self.topic.encode('utf-8')
if self.create_client:
self.client = KafkaClient('%s:%d' % (self.server.host, self.server.port))
- self.client.ensure_topic_exists(self.topic.encode('utf-8'))
+ self.client.ensure_topic_exists(self.topic)
self._messages = {}