Skip to content

Commit 98d91fb

Browse files
committed
Fix assay and contact role mappings to use JSON strings for study_ref and roles
1 parent 65e0e5a commit 98d91fb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

middleware/sql_to_arc/tests/unit/test_mapper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def test_map_assay() -> None:
107107
"""Test mapping of assay data."""
108108
row = AssayRow(
109109
identifier="1",
110-
study_ref=["sty1"],
110+
study_ref='["sty1"]', # type: ignore[arg-type]
111111
investigation_ref="inv1",
112112
measurement_type_term="Proteomics",
113113
measurement_type_uri="http://example.org/prot",
@@ -132,7 +132,7 @@ def test_map_assay_with_platform() -> None:
132132
"""Test mapping of assay data including technology platform."""
133133
row = AssayRow(
134134
identifier="2",
135-
study_ref=["sty1"],
135+
study_ref='["sty1"]', # type: ignore[arg-type]
136136
investigation_ref="inv1",
137137
technology_platform="Orbitrap",
138138
)
@@ -173,7 +173,7 @@ def test_map_contact() -> None:
173173
last_name="Doe",
174174
first_name="John",
175175
email="john@example.com",
176-
roles=[{"term": "Principal Investigator", "uri": "http://roles", "version": "1.0"}],
176+
roles='[{"term": "Principal Investigator", "uri": "http://roles", "version": "1.0"}]', # type: ignore[arg-type]
177177
)
178178

179179
person = map_contact(row)
@@ -195,7 +195,7 @@ def test_map_contact_invalid_roles() -> None:
195195
investigation_ref="inv1",
196196
target_type="investigation",
197197
last_name="Smith",
198-
roles=None,
198+
roles="{invalid-json}", # type: ignore[arg-type]
199199
)
200200

201201

0 commit comments

Comments
 (0)