@unittest.skip("Can't test the tag.update endpoint, "
                   "since there are no fields that can be updated")
    def test_update(self):
        # Update the tag using the Trovebox class, passing in the tag object
        owner = "test1@trovebox.com"
        ret_val = self.client.tag.update(self.tags[0], owner=owner)

        # Check that the tag is updated
        self.tags = self.client.tags.list()
        self.assertEqual(self.tags[0].owner, owner)
        self.assertEqual(ret_val.owner, owner)

        # Update the tag using the Trovebox class, passing in the tag id
        owner = "test2@trovebox.com"
        ret_val = self.client.tag.update(self.TEST_TAG, owner=owner)

        # Check that the tag is updated
        self.tags = self.client.tags.list()
        self.assertEqual(self.tags[0].owner, owner)
        self.assertEqual(ret_val.owner, owner)

        # Update the tag using the Tag object directly
        owner = "test3@trovebox.com"
        ret_val = self.tags[0].update(owner=owner)

        # Check that the tag is updated
        self.tags = self.client.tags.list()
        self.assertEqual(self.tags[0].owner, owner)
        self.assertEqual(ret_val.owner, owner)
Test that a tag can be updated
dataset/ETHPy150Open photo/openphoto-python/tests/functional/test_tags.py/TestTags.test_update