From f55d7181bb60074357bda26bffb2c513fa5666bb Mon Sep 17 00:00:00 2001 From: Michael Thornton Date: Mon, 9 Dec 2024 14:55:06 -0800 Subject: [PATCH] replicate error in unit test --- tests/test_wfutils.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_wfutils.py b/tests/test_wfutils.py index f6a75300..c0b9038b 100644 --- a/tests/test_wfutils.py +++ b/tests/test_wfutils.py @@ -320,6 +320,18 @@ def test_workflow_execution_record_from_workflow_job(site_config, fixtures_dir, assert wfe.ended_at_time +def test_make_data_objects_substutes_workflow_id(site_config, fixtures_dir, tmp_path): + job_metadata = json.load(open(fixtures_dir / "mags_job_metadata.json")) + workflow_state = json.load(open(fixtures_dir / "mags_workflow_state.json")) + job = WorkflowJob(site_config, workflow_state, job_metadata) + data_objects = job.make_data_objects(output_dir=tmp_path) + assert data_objects + for data_object in data_objects: + assert isinstance(data_object, DataObject) + assert job.workflow_execution_id in data_object.description + + + def test_workflow_job_from_database_job_record(site_config, fixtures_dir): job_rec = json.load(open(fixtures_dir / "nmdc_api/unsubmitted_job.json"))