Context
The existing AppHelpersModuleTests already asserts the
catalogue has no banned ids, every entry has the required
fields, and list_model_choices() orders Free first. A
new contributor can still introduce subtle bugs: duplicate
ids, multiple Free entries marked as the default, a tier
value that's neither "Free" nor "Paid", or a performance
rating that breaks the existing 3-star scheme. A single
test_catalogue_is_well_formed smoke test catches all of
these in one go.
What to change
Add one test method to AppHelpersModuleTests in
tests/test_agent.py that asserts:
- No two entries in
AVAILABLE_MODELS share a name field.
tier is one of {"Free", "Paid"} for every entry.
performance matches r"^⭐+$" (one or more star emojis).
description is non-empty for every entry.
- Exactly one entry has
tier == "Free" AND is the
DEFAULT_MODEL_ID (locks the "implicit default" contract
from G9).
How to verify
- The new test passes on the current catalogue.
- Mutating the catalogue to break any rule makes the test
fail with a precise error message.
python -m unittest tests.test_agent.AppHelpersModuleTests -v
is green.
Skill: schema validation, fixture design.
Estimated effort: S.
Context
The existing
AppHelpersModuleTestsalready asserts thecatalogue has no banned ids, every entry has the required
fields, and
list_model_choices()orders Free first. Anew contributor can still introduce subtle bugs: duplicate
ids, multiple Free entries marked as the default, a
tiervalue that's neither "Free" nor "Paid", or a
performancerating that breaks the existing 3-star scheme. A single
test_catalogue_is_well_formedsmoke test catches all ofthese in one go.
What to change
Add one test method to
AppHelpersModuleTestsintests/test_agent.pythat asserts:AVAILABLE_MODELSshare anamefield.tieris one of{"Free", "Paid"}for every entry.performancematchesr"^⭐+$"(one or more star emojis).descriptionis non-empty for every entry.tier == "Free"AND is theDEFAULT_MODEL_ID(locks the "implicit default" contractfrom G9).
How to verify
fail with a precise error message.
python -m unittest tests.test_agent.AppHelpersModuleTests -vis green.
Skill: schema validation, fixture design.
Estimated effort: S.