def test_send_to_caller(self): request = Mock(response_queue=Mock(), id_=1234) client = ClientComms(Mock()) client.requests = {1234: request} response = Mock(id=1234) client.send_to_caller(response) request.response_queue.put.assert_called_once_with(response)
def test_send_to_caller(self): request = Mock(response_queue=Mock(), id_=1234) client = ClientComms("c", Mock()) client.requests = {1234:request} response = Mock(id_ = 1234) client.send_to_caller(response) request.response_queue.put.assert_called_once_with(response)
def test_send_to_caller_with_block_update(self): c = ClientComms(Mock()) response = Update(id_=0) c.send_to_caller(response) c.process.update_block_list.assert_called_once_with(c, response.value)
def test_send_to_caller_with_block_update(self): c = ClientComms("c", Mock()) response = Update(id_=0) c.send_to_caller(response) c.process.update_block_list.assert_called_once_with(c, response.value)