Exemplo n.º 1
0
 def test_retrurn_error_code_0_call(self):
     c = Client('test:test')
     c.server.one = Mock()
     c.server.one.test_method = lambda x: [0, '2']
     c.call('test_method')
Exemplo n.º 2
0
 def test_connection_error(self):
     c = Client('test:test')
     c.server.one = Mock()
     c.server.one.test_method = Mock(side_effect=socket.error(1))
     c.call('test_method')
Exemplo n.º 3
0
 def test_return_one_value_call(self):
     c = Client('test:test')
     c.server.one = Mock()
     c.server.one.test_method = lambda x: [1]
     assert c.call('test_method') == ''