summaryrefslogtreecommitdiff
path: root/test/testutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/testutil.py')
-rw-r--r--test/testutil.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/testutil.py b/test/testutil.py
index e6947b4..1f1a1df 100644
--- a/test/testutil.py
+++ b/test/testutil.py
@@ -23,8 +23,7 @@ __all__ = [
]
def random_string(l):
- s = "".join(random.choice(string.ascii_letters) for i in xrange(l))
- return s.encode('utf-8')
+ return "".join(random.choice(string.ascii_letters) for i in xrange(l))
def kafka_versions(*versions):
def kafka_versions(func):
@@ -60,7 +59,7 @@ class KafkaIntegrationTestCase(unittest.TestCase):
return
if not self.topic:
- topic = "%s-%s" % (self.id()[self.id().rindex(".") + 1:], random_string(10).decode('utf-8'))
+ topic = "%s-%s" % (self.id()[self.id().rindex(".") + 1:], random_string(10))
self.topic = topic
self.bytes_topic = topic.encode('utf-8')