def test_destroy_objects(self): self.fake_client.objects.delete_object.return_value = {"status": "200"}, "" self.useFixture(mockpatch.PatchObject(javelin, "client_for_user", return_value=self.fake_client)) javelin.destroy_objects([self.fake_object]) mocked_function = self.fake_client.objects.delete_object mocked_function.asswert_called_once(self.fake_object["container"], self.fake_object["name"])
def test_destroy_objects(self): self.fake_client.objects.delete_object.return_value = \ {'status': "200"}, "" self.useFixture(mockpatch.PatchObject(javelin, "client_for_user", return_value=self.fake_client)) javelin.destroy_objects([self.fake_object]) mocked_function = self.fake_client.objects.delete_object mocked_function.asswert_called_once(self.fake_object['container'], self.fake_object['name'])
def test_destroy_objects(self): fake_client = mock.MagicMock() fake_client.objects.delete_object.return_value = {'status': "200"}, "" self.useFixture(mockpatch.PatchObject(javelin, "client_for_user", return_value=fake_client)) javelin.destroy_objects([self.fake_object]) mocked_function = fake_client.objects.delete_object mocked_function.asswert_called_once(self.fake_object['container'], self.fake_object['name'])