From 974cda1b7ad21ae6c2e7f2f03d5f87d8061c143b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Reni=C3=A9?= Date: Fri, 29 Aug 2014 09:44:41 +0200 Subject: Encode topic directly --- test/testutil.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test') 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 = {} -- cgit v1.2.1