diff options
author | Dana Powers <dana.powers@gmail.com> | 2016-04-04 18:57:32 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2016-04-07 09:49:05 -0700 |
commit | d61e861b0da1647974e617e1633c429c307789be (patch) | |
tree | dad1382251212e88666baa20c7ec8d279487fa48 /test/test_client_async.py | |
parent | 931373478e30a9d44b89fad6491136222441e929 (diff) | |
download | kafka-python-d61e861b0da1647974e617e1633c429c307789be.tar.gz |
Consolidate conn fixture definitions
Diffstat (limited to 'test/test_client_async.py')
-rw-r--r-- | test/test_client_async.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/test/test_client_async.py b/test/test_client_async.py index 2cf348c..c326d55 100644 --- a/test/test_client_async.py +++ b/test/test_client_async.py @@ -31,21 +31,6 @@ def test_bootstrap_servers(mocker, bootstrap, expected_hosts): assert sorted(hosts) == sorted(expected_hosts) -@pytest.fixture -def conn(mocker): - conn = mocker.patch('kafka.client_async.BrokerConnection') - conn.return_value = conn - conn.state = ConnectionStates.CONNECTED - conn.send.return_value = Future().success( - MetadataResponse[0]( - [(0, 'foo', 12), (1, 'bar', 34)], # brokers - [])) # topics - conn.blacked_out.return_value = False - conn.connect.side_effect = lambda: conn.state - conn.connected = lambda: conn.connect() is ConnectionStates.CONNECTED - return conn - - def test_bootstrap_success(conn): conn.state = ConnectionStates.CONNECTED cli = KafkaClient() |