summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDana Powers <dana.powers@rd.io>2014-09-01 02:29:43 -0700
committerDana Powers <dana.powers@rd.io>2014-09-01 18:04:10 -0700
commit3bfe593e2fc47c4ab4b90edb07d205ed07489322 (patch)
tree17c220e74d6017ab2850bc6839bb10a89eac9449 /test
parentbebe7b663894c96d407b3b65725c8779c3b3af4d (diff)
downloadkafka-python-3bfe593e2fc47c4ab4b90edb07d205ed07489322.tar.gz
Refactor internal metadata dicts in KafkaClient
- use helper methods not direct access - add get_partition_ids_for_topic - check for topic and partition errors during load_metadata_for_topics - raise LeaderNotAvailableError when topic is being auto-created or UnknownTopicOrPartitionError if auto-creation off
Diffstat (limited to 'test')
-rw-r--r--test/test_producer_integration.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test_producer_integration.py b/test/test_producer_integration.py
index 7d3a180..b4e076a 100644
--- a/test/test_producer_integration.py
+++ b/test/test_producer_integration.py
@@ -148,7 +148,8 @@ class TestKafkaProducerIntegration(KafkaIntegrationTestCase):
producer = SimpleProducer(self.client)
# At first it doesn't exist
- with self.assertRaises(UnknownTopicOrPartitionError):
+ with self.assertRaises((UnknownTopicOrPartitionError,
+ LeaderNotAvailableError)):
resp = producer.send_messages(new_topic, self.msg("one"))
@kafka_versions("all")