Skip to content

Commit 775b949

Browse files
committed
fix(test): assert radionuclides back-populates on sample info
- verify sample_info.radionuclides includes the new record - keep FK/relationship tests aligned to chemistry_sample_info_id
1 parent 5783e6d commit 775b949

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_radionuclides_legacy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def test_radionuclides_fk_has_cascade():
302302

303303

304304
def test_radionuclides_back_populates_sample_info(water_well_thing):
305-
"""NMA_Radionuclides.chemistry_sample_info navigates back to sample info."""
305+
"""NMA_Radionuclides <-> NMA_Chemistry_SampleInfo back_populates works."""
306306
with session_ctx() as session:
307307
sample_info = NMA_Chemistry_SampleInfo(
308308
nma_sample_pt_id=uuid4(),
@@ -323,6 +323,7 @@ def test_radionuclides_back_populates_sample_info(water_well_thing):
323323

324324
assert record.chemistry_sample_info is not None
325325
assert record.chemistry_sample_info.id == sample_info.id
326+
assert record in sample_info.radionuclides
326327

327328
session.delete(record)
328329
session.delete(sample_info)

0 commit comments

Comments
 (0)