def test_tag_replaces(self) -> None:
        """Test that a tag can replace another tag."""
        tag = Tag(name="testst").save()
        newtag = Tag(name="test").save()
        newtag.replaces = ["testst"]
        newtag = newtag.save()

        self.obs1.tag(["testst"])
        tags = self.obs1.get_tags()
        self.assertEqual(len(tags), 1)
        self.assertEqual(tags["test"].name, "test")

        tag = Tag.find(name="testst")
        assert tag is not None
        self.assertEqual(tag.count, 0)
        tag = Tag.find(name="test")
        assert tag is not None
        self.assertEqual(tag.count, 1)
Test that a tag can replace another tag.
tests/schemas/tag.py