summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_consumer.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_consumer.py b/test/test_consumer.py
index 073a3af..e5dd946 100644
--- a/test/test_consumer.py
+++ b/test/test_consumer.py
@@ -24,6 +24,14 @@ class TestKafkaConsumer(unittest.TestCase):
with self.assertRaises(KafkaConfigurationError):
KafkaConsumer(bootstrap_servers='localhost:9092', fetch_max_wait_ms=41000, request_timeout_ms=40000)
+ def test_subscription_copy(self):
+ consumer = KafkaConsumer('foo', api_version=(0, 10))
+ sub = consumer.subscription()
+ assert sub is not consumer.subscription()
+ assert sub == set(['foo'])
+ sub.add('fizz')
+ assert consumer.subscription() == set(['foo'])
+
class TestMultiProcessConsumer(unittest.TestCase):
@unittest.skipIf(sys.platform.startswith('win'), 'test mocking fails on windows')