Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lims sarscov2 test #4111

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions tests/fixtures/cgweb_orders/sarscov2.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@
"lab_code": null,
"mother": null,
"name": "sarscov2sample1",
"organism": "other",
"organism_other": "unknown",
"original_lab": "Unilabs Stockholm",
"original_lab_address": "171 54 Solna",
"organism": "SARS-CoV-2",
"organism_other": "",
"original_lab": "Karolinska University Hospital Solna",
"original_lab_address": "171 76 Solna",
"phenotype_groups": null,
"phenotype_terms": null,
"pool": null,
"post_formalin_fixation_time": null,
"pre_processing_method": "Other (specify in \"Comments\")",
"pre_processing_method": "COVIDSeq",
"primer": "Illumina Artic V3",
"priority": "research",
"quantity": "3",
"reagent_label": null,
"reference_genome": "NC_000001",
"reference_genome": "NC_111",
"region": "Stockholm",
"region_code": "01",
"require_qc_ok": null,
Expand Down Expand Up @@ -331,8 +331,8 @@
"lab_code": null,
"mother": null,
"name": "sarscov2sample6",
"organism": "SARS-CoV-2",
"organism_other": "",
"organism": "other",
"organism_other": "unknown",
"original_lab": "LaboratorieMedicinskt Centrum Gotland",
"original_lab_address": "621 84 Visby",
"phenotype_groups": null,
Expand Down
16 changes: 7 additions & 9 deletions tests/services/orders/lims_service/test_order_lims_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,15 @@ def test_to_lims_microbial(microbial_order_to_submit: dict):
assert first_sample["udfs"]["volume"] == "20"


@pytest.mark.xfail(reason="Mutant extraction methods need a new enum")
def test_to_lims_sarscov2(sarscov2_order_to_submit: dict):
def test_to_lims_sarscov2(mutant_order: MutantOrder):
# GIVEN a sarscov2 order for samples
order_data = MutantOrder.model_validate(sarscov2_order_to_submit)

# WHEN parsing for LIMS
samples: list[LimsSample] = OrderLimsService._build_lims_sample(
customer="cust000",
samples=order_data.samples,
samples=mutant_order.samples,
workflow=Workflow.MUTANT,
delivery_type=order_data.delivery_type,
delivery_type=mutant_order.delivery_type,
)

# THEN it should have found the same number of samples
Expand All @@ -164,16 +162,16 @@ def test_to_lims_sarscov2(sarscov2_order_to_submit: dict):
assert first_sample["udfs"]["collection_date"] == "2021-05-05"
assert first_sample["udfs"]["extraction_method"] == "MagNaPure 96"
assert first_sample["udfs"]["lab_code"] == "SE100 Karolinska"
assert first_sample["udfs"]["organism"] == "SARS CoV-2"
assert first_sample["udfs"]["organism"] == "SARS-CoV-2"
assert first_sample["udfs"]["original_lab"] == "Karolinska University Hospital Solna"
assert first_sample["udfs"]["original_lab_address"] == "171 76 Stockholm"
assert first_sample["udfs"]["original_lab_address"] == "171 76 Solna"
assert first_sample["udfs"]["pre_processing_method"] == "COVIDSeq"
assert first_sample["udfs"]["priority"] == "research"
assert first_sample["udfs"]["reference_genome"] == "NC_111"
assert first_sample["udfs"]["region"] == "Stockholm"
assert first_sample["udfs"]["region_code"] == "01"
assert first_sample["udfs"]["selection_criteria"] == "1. Allmän övervakning"
assert first_sample["udfs"]["volume"] == "1"
assert first_sample["udfs"]["selection_criteria"] == "Allmän övervakning"
assert first_sample["udfs"]["volume"] == "20"


def test_to_lims_balsamic(balsamic_order_to_submit: dict):
Expand Down
Loading