summaryrefslogtreecommitdiff
path: root/test/fixtures.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixtures.py')
-rw-r--r--test/fixtures.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/fixtures.py b/test/fixtures.py
index 654e636..b8d6fc3 100644
--- a/test/fixtures.py
+++ b/test/fixtures.py
@@ -182,7 +182,8 @@ class ZookeeperFixture(Fixture):
class KafkaFixture(Fixture):
@classmethod
- def instance(cls, broker_id, zk_host, zk_port, zk_chroot=None, port=None,
+ def instance(cls, broker_id, zk_host, zk_port, zk_chroot=None,
+ host=None, port=None,
transport='PLAINTEXT', replicas=1, partitions=2):
if zk_chroot is None:
zk_chroot = "kafka-python_" + str(uuid.uuid4()).replace("-", "_")
@@ -207,7 +208,8 @@ class KafkaFixture(Fixture):
#
# Note that even though we specify the bind host in bracket notation, Kafka responds to the bootstrap
# metadata request without square brackets later.
- host = "[::1]"
+ if host is None:
+ host = "[::1]"
fixture = KafkaFixture(host, port, broker_id,
zk_host, zk_port, zk_chroot,
transport=transport,