Beispiel #1
0
 def serf(self):
     return client.SerfClient()
Beispiel #2
0
 def test_rpc_auth(self, mock_serf_connection_class):
     mock_serf_connection = mock.MagicMock()
     mock_serf_connection_class.return_value = mock_serf_connection
     serf = client.SerfClient(rpc_auth='secret')
     assert serf.connection is not None
     mock_serf_connection.auth.assert_called_once_with('secret')
Beispiel #3
0
 def serf(self):
     with closing(client.SerfClient()) as serf:
         yield serf