Exemple #1
0
 def test_update_pid_nonexisting(self):
     success, message = add_pid_checksum(pid_url=self.api_url + '123',
                                         checksum='BAR',
                                         username=self.username,
                                         password=self.password)
     self.assertEqual(success, False)
     self.assertEqual(type(message), str)
Exemple #2
0
    def test_update_pid(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 = add_pid_checksum(pid_url=pid_url,
                                            checksum='BAR',
                                            username=self.username,
                                            password=self.password)
        self.assertEqual(success, True)
        self.assertEqual(type(message), str)
    def test_update_pid(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 = add_pid_checksum(
            pid_url=pid_url, checksum="BAR", username=self.username, password=self.password
        )
        self.assertEqual(success, True)
        self.assertEqual(type(message), str)
 def test_update_pid_nonexisting(self):
     success, message = add_pid_checksum(
         pid_url=self.api_url + "123", checksum="BAR", username=self.username, password=self.password
     )
     self.assertEqual(success, False)
     self.assertEqual(type(message), str)