def test_ensure_image_exists_no_build(self):
    service = Service('foo', client=self.mock_client, build={'context': '.'})
    self.mock_client.inspect_image.return_value = {'Id': 'abc123'}
    service.ensure_image_exists(do_build=BuildAction.skip)
    assert (not self.mock_client.build.called)
def test_ensure_image_exists_no_build(self):
    service = Service('foo', client=self.mock_client, build={'context': '.'})
    self.mock_client.inspect_image.return_value = {'Id': 'abc123'}
    service.ensure_image_exists(do_build=BuildAction.skip)
    assert (not self.mock_client.build.called)