def test_delete_pid_twotimes(self):
        success, pid_url = create_pid(
            object_url="http://swift:88/v1/acc/d/f",
            api_url=self.api_url,
            username=self.username,
            password=self.password,
        )
        self.assertEqual(success, True)
        self.assertEqual(type(pid_url), str)

        success, message = delete_pid(pid_url=pid_url, username=self.username, password=self.password)
        self.assertEqual(success, True)
        self.assertEqual(type(message), str)
        success, message = delete_pid(pid_url=pid_url, username=self.username, password=self.password)
        self.assertEqual(success, False)
        self.assertEqual(type(message), str)
Exemplo n.º 2
0
    def test_delete_pid_twotimes(self):
        success, pid_url = create_pid(object_url='http://swift:88/v1/acc/d/f',
                                      api_url=self.api_url,
                                      username=self.username,
                                      password=self.password)
        self.assertEqual(success, True)
        self.assertEqual(type(pid_url), str)

        success, message = delete_pid(pid_url=pid_url,
                                      username=self.username,
                                      password=self.password)
        self.assertEqual(success, True)
        self.assertEqual(type(message), str)
        success, message = delete_pid(pid_url=pid_url,
                                      username=self.username,
                                      password=self.password)
        self.assertEqual(success, False)
        self.assertEqual(type(message), str)
 def test_delete_pid_nonexisting(self):
     success, message = delete_pid(pid_url="http://localhost", username=self.username, password=self.password)
     self.assertEqual(success, False)
Exemplo n.º 4
0
 def test_delete_pid_nonexisting(self):
     success, message = delete_pid(pid_url='http://localhost',
                                   username=self.username,
                                   password=self.password)
     self.assertEqual(success, False)