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
Add tests for chemistry children that require NMA_Chemistry_SampleInfo #474
We now have coverage for radionuclides requiring chemistry_sample_info_id, but we don’t have equivalent tests for other chemistry children. Add tests to ensure these models enforce the parent sample info requirement and
validate their relationships.
Scope / Targets:
NMA_MajorChemistry
NMA_MinorTraceChemistry
NMA_FieldParameters
Notes:
Confirm correct model names and relationships in db/nma_legacy.py.
Avoid duplicating existing coverage; check tests/test_major_chemistry_legacy.py, tests/integration/test_nma_legacy_relationships.py, and any step files.
Acceptance Criteria:
Each listed chemistry child has a test that:
fails when chemistry_sample_info_id is missing/null
verifies relationship navigation from NMA_Chemistry_SampleInfo (back_populates)
Tests are placed in a clearly labeled section/class (e.g., TestChemistryChildrenRequireSampleInfo) or aligned with existing test organization.
Integration/feature tests updated if they currently assume a thing_id FK for these children.
Proposed Tasks:
Add unit/integration tests for each child’s missing chemistry_sample_info_id (expect ValueError/IntegrityError as appropriate).
Add relationship navigation tests from NMA_Chemistry_SampleInfo to each child.
Activity