test_alias_prefixes_accumulate_exactly_as_their_siblings_do

Tests › tests/test_tiers.py

passed Passed in the packaged run.

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

  1. —
→

When

  1. writers, _readers, prefixes = resolve_shared_key_patterns( {KEY_ALIAS_FIELD: ["APP_KEY_"], "writers": [{"name_prefix": "App_Set_"}]} )
  2. surviving = {getattr(w, "prefix", None) for w in writers}
→

Then

  1. ✓ {"App_Set_", "DataModel_Set_"} is at most surviving
  2. ✓ set(prefixes) equals {"APP_KEY_", *DEFAULT_KEY_ALIAS_PREFIXES}

tests/test_tiers.py:273 · its file's page

What it checks (2)

  1. assert {"App_Set_", "DataModel_Set_"} <= surviving, "writers accumulate — control arm" not attributed
  2. assert 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

test_alias_prefixes_accumulate_exactly_as_their_siblings_do→resolve_shared_key_patterns

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.

test_alias_prefixes_accumulate_exactly_as_their_siblings_do · 2 checksresolve_shared_key_patternsREQ-DDB-CONFIG-006 · measuredresolve_shared_key_patternsREQ-DDB-SCHEMA-005 · measuredresolve_shared_key_patternsload_shared_key_patternsdeclaration_originREQ-DDB-SCHEMA-012 · measured
Also reaches 3 requirements

Its run touches their code; that is reach, not proof.