diff options
author | Bruno ReniƩ <brutasse@gmail.com> | 2014-08-29 09:44:41 +0200 |
---|---|---|
committer | Mark Roberts <wizzat@fb.com> | 2014-09-03 09:55:45 -0700 |
commit | 974cda1b7ad21ae6c2e7f2f03d5f87d8061c143b (patch) | |
tree | 709e66af681f27ac4caae8d82103150e5b5e6b60 /test/testutil.py | |
parent | 85785bbce311973ee6161e56dac23a08427cec8c (diff) | |
download | kafka-python-974cda1b7ad21ae6c2e7f2f03d5f87d8061c143b.tar.gz |
Encode topic directly
Diffstat (limited to 'test/testutil.py')
-rw-r--r-- | test/testutil.py | 3 |
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 = {} |