def test_remove_image_with_error(self):
    self.mock_client.remove_image.side_effect = error = APIError(message='testing', response={}, explanation='Boom')
    web = Service('web', image='example', client=self.mock_client)
    with mock.patch('compose.service.log', autospec=True) as mock_log:
        assert (not web.remove_image(ImageType.all))
    mock_log.error.assert_called_once_with('Failed to remove image for service %s: %s', web.name, error)
def test_remove_image_with_error(self):
    self.mock_client.remove_image.side_effect = error = APIError(message='testing', response={}, explanation='Boom')
    web = Service('web', image='example', client=self.mock_client)
    with mock.patch('compose.service.log', autospec=True) as mock_log:
        assert (not web.remove_image(ImageType.all))
    mock_log.error.assert_called_once_with('Failed to remove image for service %s: %s', web.name, error)