summaryrefslogtreecommitdiff
path: root/test/testutil.py
diff options
context:
space:
mode:
authorBruno ReniƩ <brutasse@gmail.com>2014-08-29 09:44:41 +0200
committerMark Roberts <wizzat@fb.com>2014-09-03 09:55:45 -0700
commit974cda1b7ad21ae6c2e7f2f03d5f87d8061c143b (patch)
tree709e66af681f27ac4caae8d82103150e5b5e6b60 /test/testutil.py
parent85785bbce311973ee6161e56dac23a08427cec8c (diff)
downloadkafka-python-974cda1b7ad21ae6c2e7f2f03d5f87d8061c143b.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 = {}