test_alias_prefixes_accumulate_exactly_as_their_siblings_do¶
Tests › tests/test_tiers.py
What this test is for
Why it exists
The inconsistency the migration closes, asserted against the control arm: the writers from the SAME generator already accumulated while the prefixes replaced.
Given
- —
When
writers, _readers, prefixes = resolve_shared_key_patterns( {KEY_ALIAS_FIELD: ["APP_KEY_"], "writers": [{"name_prefix": "App_Set_"}]} )surviving = {getattr(w, "prefix", None) for w in writers}
Then
- ✓ {"App_Set_", "DataModel_Set_"} is at most surviving
- ✓ set(prefixes) equals {"APP_KEY_", *DEFAULT_KEY_ALIAS_PREFIXES}
tests/test_tiers.py:273 · its file's page
What it checks (2)
assert {"App_Set_", "DataModel_Set_"} <= surviving, "writers accumulate — control arm"not attributedassert set(prefixes) == {"APP_KEY_", *DEFAULT_KEY_ALIAS_PREFIXES}not attributed
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-SCHEMA-005 measured
- REQ-DDB-SCHEMA-012 measured