summaryrefslogtreecommitdiff
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
parent9bed11db98387c0d9e456528130b330631dc50af (diff)
downloadkafka-python-6ee151427c144cc830eba954234f4f89f4529fe3.tar.gz
Remove test support for py26 since it's broken
-rw-r--r--test/test_client.py27
-rw-r--r--test/test_conn.py73
-rw-r--r--test/test_util.py15
-rw-r--r--tox.ini2
4 files changed, 116 insertions, 1 deletions
diff --git a/test/test_client.py b/test/test_client.py
new file mode 100644
index 0000000..800ca66
--- /dev/null
+++ b/test/test_client.py
@@ -0,0 +1,27 @@
+import os
+import random
+import struct
+import unittest
+import kafka.client
+
+class ConnTest(unittest.TestCase):
+ def test_load_metadata_for_topics(self):
+ pass
+
+ def test_get_leader_for_partition(self):
+ pass
+
+ def test_get_leader_for_partition__no_leader(self):
+ pass
+
+ def test_get_conn_for_broker(self):
+ pass
+
+ def test_send_broker_unaware_request(self):
+ pass
+
+ def test_send_broker_unaware_request__no_brokers(self):
+ pass
+
+ def test_send_broker_unaware_request__all_brokers_down(self):
+ pass
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()
diff --git a/test/test_util.py b/test/test_util.py
new file mode 100644
index 0000000..e6faabb
--- /dev/null
+++ b/test/test_util.py
@@ -0,0 +1,15 @@
+import os
+import random
+import struct
+import unittest
+import kafka.util
+
+class UtilTest(unittest.TestCase):
+ def test_relative_unpack(self):
+ pass
+
+ def test_write_int_string(self):
+ pass
+
+ def test_read_int_string(self):
+ pass
diff --git a/tox.ini b/tox.ini
index 0077c4d..8559fc0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py26, py27
+envlist = py27
[testenv]
deps =
pytest