You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fail by name when the spec adds a grant context or input type #22
AGENTS.md asks that tests write an expected outcome for every enum member as a literal table, parametrize over it, and assert the table covers the whole enum, so a value codegen adds fails a named test until someone records how it behaves (#21). Two tests still miss new values:
TestVariantDiscrimination (tests/test_permission_grants.py) checks 3 of the 15 grant contexts. List the expected variant class for every PermissionGrantEntityType except any, parametrize over that table, and assert it covers the enum. Every type has a variant today, but a new context type from the spec without one would fail to parse real responses with no test noticing.
SPEC_ENUM_VALUES (integration_tests/test_application_form_input_type_contract.py) hardcodes the InputType values it round-trips through PDC. Assert it matches set(InputType), so a value the spec adds or drops fails by name.
#21 already does this for the grantee-key validator and the Keycloak sync statuses.
changed the title [-]Parametrize tests over enums, unions, and tables instead of hand-listed cases[/-][+]Fail by name when the spec adds a grant context or input type[/+]on Nov 24, 2026
Activity
[-]Parametrize tests over enums, unions, and tables instead of hand-listed cases[/-][+]Fail by name when the spec adds a grant context or input type[/+]