Summary
12 test failures with KeyError on three expected response/payload keys:
| Key |
Count |
Likely cause |
usage |
6 |
Tests do response.data[\"usage\"] — either the field was removed from the serializer output or the usage fixture isn't seeding UsageBucket rows for the test's asset |
product |
4 |
Test stragglers using the old field name (renamed to model in commit 0012_rename_product_asset_model_and_more) — three were fixed today, four remain |
hostname |
2 |
Edge case — likely tests inspecting a response that omits hostname for assets with hostname IS NULL (after the recent nullable-hostname change) |
Impact
12 test failures. Smaller than #199 (38) or #200 (32) but mechanical to clear in a single pass.
Suggested approach
Each key is its own grep — these don't share a single fix, but they're all the same shape ("test expected a key that isn't there"):
# usage — find which AssetSerializer code path drops it
grep -rn '\"usage\"' blueflow/tests/ blueflow/views/asset.py
# product — should be \"model\"
grep -rn '\\[\"product\"\\]' blueflow/tests/
# hostname — likely the response shape change for NULL hostnames
grep -rn '\\[\"hostname\"\\]' blueflow/tests/
For \"hostname\": with the model now null=True, response.data[\"hostname\"] will be None for assets without a hostname, not \"\". Tests asserting assert response.data[\"hostname\"] == \"\" would now fail.
Notes
Cleanup tail from the product → model rename and the recent hostname nullability change. Internal regression-prevention only.
Summary
12 test failures with
KeyErroron three expected response/payload keys:usageresponse.data[\"usage\"]— either the field was removed from the serializer output or the usage fixture isn't seedingUsageBucketrows for the test's assetproductmodelin commit0012_rename_product_asset_model_and_more) — three were fixed today, four remainhostnamehostname IS NULL(after the recent nullable-hostname change)Impact
12 test failures. Smaller than #199 (38) or #200 (32) but mechanical to clear in a single pass.
Suggested approach
Each key is its own grep — these don't share a single fix, but they're all the same shape ("test expected a key that isn't there"):
For
\"hostname\": with the model nownull=True,response.data[\"hostname\"]will beNonefor assets without a hostname, not\"\". Tests assertingassert response.data[\"hostname\"] == \"\"would now fail.Notes
Cleanup tail from the
product→modelrename and the recent hostname nullability change. Internal regression-prevention only.