More bugfixes in the glossary protection guard module

This commit is contained in:
2026-04-22 12:17:52 -05:00
parent 15cdf01f58
commit 87c47517a0
9 changed files with 269 additions and 28 deletions

View File

@@ -177,6 +177,34 @@ def test_valid_glossary_parses():
)
assert glossary.glossary[0].name == "Lyra"
assert glossary.glossary[0].plural is None
def test_glossary_accepts_optional_plural():
glossary = parse_glossary_yaml(
"""
glossary:
- name: "Godfrey"
plural: "Godfreys"
category: npc
summary: "Godfrey is an NPC."
"""
)
assert glossary.glossary[0].plural == "Godfreys"
def test_glossary_rejects_empty_plural():
with pytest.raises(AuditaValidationError):
parse_glossary_yaml(
"""
glossary:
- name: "Godfrey"
plural: ""
category: npc
summary: "Godfrey is an NPC."
"""
)
def test_glossary_rejects_empty_entries():