summaryrefslogtreecommitdiff
path: root/test/testutil.py
diff options
context:
space:
mode:
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 = {}