Skip to content

Commit

Permalink
replicate error in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mbthornton-lbl committed Dec 9, 2024
1 parent b6b18ac commit f55d718
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_wfutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit f55d718

Please sign in to comment.