summaryrefslogtreecommitdiff
path: root/test/test_client_integration.py
diff options
context:
space:
mode:
authorDana Powers <dana.powers@rd.io>2014-09-07 18:52:05 -0700
committerDana Powers <dana.powers@rd.io>2014-09-07 19:09:32 -0700
commit715425c639a476139065689afde3d255a07d6f96 (patch)
tree0ef2cd875c97c8ca867d89328d6fd5fec7dfcbe8 /test/test_client_integration.py
parenta99384f4c601d127ab1c4fe5b272ea5c07fd695d (diff)
parentbe23042ecd9ab330886745ccc9ec9e3a0039836f (diff)
downloadkafka-python-715425c639a476139065689afde3d255a07d6f96.tar.gz
Merge pull request #227 from wizzat-feature/py3
Python 3 Support Conflicts: kafka/producer.py test/test_client.py test/test_client_integration.py test/test_codec.py test/test_consumer.py test/test_consumer_integration.py test/test_failover_integration.py test/test_producer.py test/test_producer_integration.py test/test_protocol.py test/test_util.py
Diffstat (limited to 'test/test_client_integration.py')
-rw-r--r--test/test_client_integration.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/test/test_client_integration.py b/test/test_client_integration.py
index b433146..0cd2c9e 100644
--- a/test/test_client_integration.py
+++ b/test/test_client_integration.py
@@ -1,8 +1,5 @@
import os
-import socket
-import unittest2
-from kafka.conn import KafkaConnection
from kafka.common import (
FetchRequest, OffsetCommitRequest, OffsetFetchRequest,
KafkaTimeoutError
@@ -10,7 +7,7 @@ from kafka.common import (
from test.fixtures import ZookeeperFixture, KafkaFixture
from test.testutil import (
- KafkaIntegrationTestCase, get_open_port, kafka_versions, Timer
+ KafkaIntegrationTestCase, kafka_versions
)
class TestKafkaClientIntegration(KafkaIntegrationTestCase):
@@ -51,7 +48,7 @@ class TestKafkaClientIntegration(KafkaIntegrationTestCase):
# ensure_topic_exists should fail with KafkaTimeoutError
with self.assertRaises(KafkaTimeoutError):
- self.client.ensure_topic_exists("this_topic_doesnt_exist", timeout=0)
+ self.client.ensure_topic_exists(b"this_topic_doesnt_exist", timeout=0)
####################
# Offset Tests #
@@ -59,12 +56,12 @@ class TestKafkaClientIntegration(KafkaIntegrationTestCase):
@kafka_versions("0.8.1", "0.8.1.1")
def test_commit_fetch_offsets(self):
- req = OffsetCommitRequest(self.topic, 0, 42, "metadata")
- (resp,) = self.client.send_offset_commit_request("group", [req])
+ req = OffsetCommitRequest(self.topic, 0, 42, b"metadata")
+ (resp,) = self.client.send_offset_commit_request(b"group", [req])
self.assertEquals(resp.error, 0)
req = OffsetFetchRequest(self.topic, 0)
- (resp,) = self.client.send_offset_fetch_request("group", [req])
+ (resp,) = self.client.send_offset_fetch_request(b"group", [req])
self.assertEquals(resp.error, 0)
self.assertEquals(resp.offset, 42)
- self.assertEquals(resp.metadata, "") # Metadata isn't stored for now
+ self.assertEquals(resp.metadata, b"") # Metadata isn't stored for now