Exemplo n.º 1
0
 def test_create_pid_fail(self):
     success, pid_url = create_pid(object_url='http://swift:88/v1/acc/d/f',
                                   api_url='http://localhost',
                                   username=self.username,
                                   password=self.password)
     self.assertEqual(success, False)
     self.assertEqual(type(pid_url), str)
Exemplo n.º 2
0
 def test_create_pid_with_parent(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,
                                   parent='http://localhost/parent-pid')
     self.assertEqual(success, True)
     self.assertEqual(type(pid_url), str)
 def test_create_pid_fail(self):
     success, pid_url = create_pid(
         object_url="http://swift:88/v1/acc/d/f",
         api_url="http://localhost",
         username=self.username,
         password=self.password,
     )
     self.assertEqual(success, False)
     self.assertEqual(type(pid_url), str)
 def test_create_pid_with_parent(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,
         parent="http://localhost/parent-pid",
     )
     self.assertEqual(success, True)
     self.assertEqual(type(pid_url), str)
    def test_delete_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 = delete_pid(pid_url=pid_url, username=self.username, password=self.password)
        self.assertEqual(success, True)
        self.assertEqual(type(message), str)
Exemplo n.º 6
0
    def test_delete_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 = delete_pid(pid_url=pid_url,
                                      username=self.username,
                                      password=self.password)
        self.assertEqual(success, True)
        self.assertEqual(type(message), str)