Exemple #1
0
    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"])
Exemple #2
0
    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'])
Exemple #3
0
    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'])