summaryrefslogtreecommitdiff
path: root/test/test_conn.py
diff options
context:
space:
mode:
authorMark Roberts <wizzat@gmail.com>2014-04-07 19:44:40 -0700
committerMark Roberts <wizzat@gmail.com>2014-04-07 19:44:40 -0700
commit6ee151427c144cc830eba954234f4f89f4529fe3 (patch)
tree35fc923fa22496a01914de1507cfd19db9d3e671 /test/test_conn.py
parent9bed11db98387c0d9e456528130b330631dc50af (diff)
downloadkafka-python-6ee151427c144cc830eba954234f4f89f4529fe3.tar.gz
Remove test support for py26 since it's broken
Diffstat (limited to 'test/test_conn.py')
-rw-r--r--test/test_conn.py73
1 files changed, 73 insertions, 0 deletions
diff --git a/test/test_conn.py b/test/test_conn.py
new file mode 100644
index 0000000..f0f60cb
--- /dev/null
+++ b/test/test_conn.py
@@ -0,0 +1,73 @@
+import os
+import random
+import struct
+import unittest
+import kafka.conn
+
+class ConnTest(unittest.TestCase):
+ def test_collect_hosts__happy_path(self):
+ hosts = "localhost:1234,localhost"
+ results = kafka.conn.collect_hosts(hosts)
+
+ self.assertEqual(set(results), set([
+ ('localhost', 1234),
+ ('localhost', 9092),
+ ]))
+
+ def test_collect_hosts__string_list(self):
+ hosts = [
+ 'localhost:1234',
+ 'localhost',
+ ]
+
+ results = kafka.conn.collect_hosts(hosts)
+
+ self.assertEqual(set(results), set([
+ ('localhost', 1234),
+ ('localhost', 9092),
+ ]))
+
+ def test_collect_hosts__with_spaces(self):
+ hosts = "localhost:1234, localhost"
+ results = kafka.conn.collect_hosts(hosts)
+
+ self.assertEqual(set(results), set([
+ ('localhost', 1234),
+ ('localhost', 9092),
+ ]))
+
+ @unittest.skip("Not Implemented")
+ def test_send(self):
+ pass
+
+ @unittest.skip("Not Implemented")
+ def test_send__reconnects_on_dirty_conn(self):
+ pass
+
+ @unittest.skip("Not Implemented")
+ def test_send__failure_sets_dirty_connection(self):
+ pass
+
+ @unittest.skip("Not Implemented")
+ def test_recv(self):
+ pass
+
+ @unittest.skip("Not Implemented")
+ def test_recv__reconnects_on_dirty_conn(self):
+ pass
+
+ @unittest.skip("Not Implemented")
+ def test_recv__failure_sets_dirty_connection(self):
+ pass
+
+ @unittest.skip("Not Implemented")
+ def test_recv__doesnt_consume_extra_data_in_stream(self):
+ pass
+
+ @unittest.skip("Not Implemented")
+ def test_close__object_is_reusable(self):
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()