Add novel model test coverage

This commit is contained in:
Veronica Berglyd Olsen
2025-03-24 22:17:34 +01:00
parent 34a3a6e85c
commit 1090a160de
4 changed files with 274 additions and 34 deletions
+4 -4
View File
@@ -818,13 +818,13 @@ class TagsIndex:
}
return
def tagName(self, tagKey: str) -> str:
def tagName(self, tagKey: str, default: str = "") -> str:
"""Get the name of a given tag."""
return self._tags.get(tagKey.lower(), {}).get("name", "")
return self._tags.get(tagKey.lower(), {}).get("name", default)
def tagDisplay(self, tagKey: str) -> str:
def tagDisplay(self, tagKey: str, default: str = "") -> str:
"""Get the display name of a given tag."""
return self._tags.get(tagKey.lower(), {}).get("display", "")
return self._tags.get(tagKey.lower(), {}).get("display", default)
def tagHandle(self, tagKey: str) -> str | None:
"""Get the handle of a given tag."""