def test_destroy_images(self): self.useFixture(mockpatch.PatchObject(javelin, "client_for_user", return_value=self.fake_client)) self.useFixture(mockpatch.PatchObject(javelin, "_get_image_by_name", return_value=self.fake_object["image"])) javelin.destroy_images([self.fake_object]) mocked_function = self.fake_client.images.delete_image mocked_function.assert_called_once_with(self.fake_object["image"]["id"])
def test_destroy_images(self): self.useFixture(mockpatch.PatchObject(javelin, "client_for_user", return_value=self.fake_client)) self.useFixture(mockpatch.PatchObject(javelin, "_get_image_by_name", return_value=self.fake_object['image'])) javelin.destroy_images([self.fake_object]) mocked_function = self.fake_client.images.delete_image mocked_function.assert_called_once_with( self.fake_object['image']['id'])