1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
import os
import random
import struct
import unittest2
import kafka.conn
class ConnTest(unittest2.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),
]))
@unittest2.skip("Not Implemented")
def test_send(self):
pass
@unittest2.skip("Not Implemented")
def test_send__reconnects_on_dirty_conn(self):
pass
@unittest2.skip("Not Implemented")
def test_send__failure_sets_dirty_connection(self):
pass
@unittest2.skip("Not Implemented")
def test_recv(self):
pass
@unittest2.skip("Not Implemented")
def test_recv__reconnects_on_dirty_conn(self):
pass
@unittest2.skip("Not Implemented")
def test_recv__failure_sets_dirty_connection(self):
pass
@unittest2.skip("Not Implemented")
def test_recv__doesnt_consume_extra_data_in_stream(self):
pass
@unittest2.skip("Not Implemented")
def test_close__object_is_reusable(self):
pass
|