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
AnalysisMethod test cleanup should be scoped to test-created IDs #567
Identified during review of #558 (558-radionuclides-backfill branch).
Problem
The after_scenario cleanup iterates over ALL AnalysisMethod records and deletes any with zero observations. This is overly aggressive — in a shared test database it can delete methods created by other fixtures or seed data.
The _backfill_created tracking dict already has an analysis_method_ids key but it is never populated by the backfill code.
Fix
Track AnalysisMethod IDs created during the backfill (populate context._backfill_created["analysis_method_ids"] in the step definitions or backfill code) and only delete those specific IDs during cleanup.
Activity
github-actions commentedon Feb 28, 2026
Linked Jira ticket created: BDMS-618
fix: harden chemistry backfill test cleanup