More bugfixes in the glossary protection guard module
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user