diff --git a/tests/fixture_plugins/orders_fixtures/order_to_submit_fixtures.py b/tests/fixture_plugins/orders_fixtures/order_to_submit_fixtures.py index ed0ecbdd99..6ed8c2f4b7 100644 --- a/tests/fixture_plugins/orders_fixtures/order_to_submit_fixtures.py +++ b/tests/fixture_plugins/orders_fixtures/order_to_submit_fixtures.py @@ -131,21 +131,3 @@ def invalid_balsamic_order_to_submit(invalid_cgweb_orders_dir: Path) -> dict: return ReadFile.get_content_from_file( file_format=FileFormat.JSON, file_path=Path(invalid_cgweb_orders_dir, "balsamic_FAIL.json") ) - - -@pytest.fixture(scope="session") -def fluffy_order_to_submit_without_index_sequence(invalid_cgweb_orders_dir) -> dict: - """Load an invalid example Fluffy order.""" - return ReadFile.get_content_from_file( - file_format=FileFormat.JSON, - file_path=Path(invalid_cgweb_orders_dir, "fluffy_no_index_sequence.json"), - ) - - -@pytest.fixture(scope="session") -def rml_order_to_submit_without_index_sequence(invalid_cgweb_orders_dir) -> dict: - """Load an invalid example RML order.""" - return ReadFile.get_content_from_file( - file_format=FileFormat.JSON, - file_path=Path(invalid_cgweb_orders_dir, "rml_no_index_sequence.json"), - ) diff --git a/tests/fixtures/cgweb_orders/fluffy.json b/tests/fixtures/cgweb_orders/fluffy.json index 5a6e518edb..091f9796a7 100644 --- a/tests/fixtures/cgweb_orders/fluffy.json +++ b/tests/fixtures/cgweb_orders/fluffy.json @@ -30,7 +30,7 @@ "formalin_fixation_time": null, "index": "IDT DupSeq 10 bp Set B", "index_number": "3", - "index_sequence": "C01 IDT_10nt_568 (TGTGAGCGAA-AACTCCGATC)", + "index_sequence": "", "internal_id": null, "lab_code": null, "mother": null, diff --git a/tests/fixtures/cgweb_orders/rml.json b/tests/fixtures/cgweb_orders/rml.json index f26f6f3858..d79932115d 100644 --- a/tests/fixtures/cgweb_orders/rml.json +++ b/tests/fixtures/cgweb_orders/rml.json @@ -30,7 +30,7 @@ "formalin_fixation_time": null, "index": "IDT DupSeq 10 bp Set B", "index_number": "3", - "index_sequence": "C01 IDT_10nt_568 (TGTGAGCGAA-AACTCCGATC)", + "index_sequence": "", "internal_id": null, "lab_code": null, "mother": null, diff --git a/tests/fixtures/invalid_cgweb_orders/fluffy_no_index_sequence.json b/tests/fixtures/invalid_cgweb_orders/fluffy_no_index_sequence.json deleted file mode 100644 index 570be5a522..0000000000 --- a/tests/fixtures/invalid_cgweb_orders/fluffy_no_index_sequence.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "cases": [], - "comment": null, - "customer": "cust000", - "data_delivery": null, - "delivery_type": "statina", - "name": "1604.19.rml", - "project_type": "fluffy", - "samples": [ - { - "age_at_sampling": null, - "application": "RMLP15R100", - "capture_kit": null, - "collection_date": null, - "comment": "comment", - "concentration": "2", - "concentration_ng_ul": null, - "concentration_sample": "4", - "container": null, - "container_name": null, - "control": "positive", - "custom_index": null, - "customer": "cust000", - "data_analysis": "FLUFFY", - "data_delivery": "statina", - "elution_buffer": null, - "extraction_method": null, - "family_name": null, - "father": null, - "formalin_fixation_time": null, - "index": "IDT DupSeq 10 bp Set B", - "index_number": "3", - "index_sequence": "", - "internal_id": null, - "lab_code": null, - "mother": null, - "name": "fluffysample1", - "organism": null, - "organism_other": null, - "original_lab": null, - "original_lab_address": null, - "phenotype_groups": null, - "phenotype_terms": null, - "pool": "pool1", - "post_formalin_fixation_time": null, - "pre_processing_method": null, - "primer": null, - "priority": "research", - "quantity": null, - "reagent_label": "C01 IDT_10nt_568 (TGTGAGCGAA-AACTCCGATC)", - "reference_genome": null, - "region": null, - "region_code": null, - "require_qc_ok": false, - "rml_plate_name": "plate1", - "selection_criteria": null, - "sex": null, - "source": null, - "status": null, - "subject_id": null, - "tissue_block_size": null, - "tumour": null, - "tumour_purity": null, - "verified_organism": null, - "volume": "20", - "well_position": null, - "well_position_rml": "A:1" - } - ], - "ticket": null, - "user_id": 1 -} \ No newline at end of file diff --git a/tests/fixtures/invalid_cgweb_orders/rml_no_index_sequence.json b/tests/fixtures/invalid_cgweb_orders/rml_no_index_sequence.json deleted file mode 100644 index 2ff48b8595..0000000000 --- a/tests/fixtures/invalid_cgweb_orders/rml_no_index_sequence.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "cases": [], - "comment": null, - "customer": "cust000", - "data_delivery": null, - "delivery_type": "fastq", - "name": "1604.19.rml", - "project_type": "rml", - "samples": [ - { - "age_at_sampling": null, - "application": "RMLP15R500", - "capture_kit": null, - "collection_date": null, - "comment": "", - "concentration": "2", - "concentration_ng_ul": null, - "concentration_sample": null, - "container": null, - "container_name": null, - "control": "", - "custom_index": null, - "customer": "cust000", - "data_analysis": "RAW-DATA", - "data_delivery": "fastq", - "elution_buffer": null, - "extraction_method": null, - "family_name": null, - "father": null, - "formalin_fixation_time": null, - "index": "NEXTflex® v2 UDI Barcodes 1 - 96", - "index_number": "3", - "index_sequence": "", - "internal_id": null, - "lab_code": null, - "mother": null, - "name": "rmlsample4", - "organism": null, - "organism_other": null, - "original_lab": null, - "original_lab_address": null, - "phenotype_groups": null, - "phenotype_terms": null, - "pool": "pool4", - "post_formalin_fixation_time": null, - "pre_processing_method": null, - "primer": null, - "priority": "priority", - "quantity": null, - "reagent_label": "UDI 3 (CGCTGCTC-GGCAGATC)", - "reference_genome": null, - "region": null, - "region_code": null, - "require_qc_ok": false, - "rml_plate_name": "rmplate4", - "selection_criteria": null, - "sex": null, - "source": null, - "status": null, - "subject_id": null, - "tissue_block_size": null, - "tumour": null, - "tumour_purity": null, - "verified_organism": null, - "volume": "23", - "well_position": null, - "well_position_rml": "A:1" - } - ], - "ticket": null, - "user_id": 1 -} \ No newline at end of file diff --git a/tests/services/orders/validation_service/test_model_validator.py b/tests/services/orders/validation_service/test_model_validator.py index ff89b587eb..bc8edb82d1 100644 --- a/tests/services/orders/validation_service/test_model_validator.py +++ b/tests/services/orders/validation_service/test_model_validator.py @@ -9,12 +9,8 @@ @pytest.mark.parametrize( "order_fixture, expected_index_sequence, order_model", [ - ( - "fluffy_order_to_submit_without_index_sequence", - "C01 IDT_10nt_568 (TGTGAGCGAA-AACTCCGATC)", - FluffyOrder, - ), - ("rml_order_to_submit_without_index_sequence", "UDI 3 (CGCTGCTC-GGCAGATC)", RmlOrder), + ("fluffy_order_to_submit", "C01 IDT_10nt_568 (TGTGAGCGAA-AACTCCGATC)", FluffyOrder), + ("rml_order_to_submit", "C01 IDT_10nt_568 (TGTGAGCGAA-AACTCCGATC)", RmlOrder), ], ids=["fluffy", "rml"], ) @@ -27,6 +23,7 @@ def test_validate_pool_sample_default_index( ): # GIVEN a pool raw order with a sample without index sequence but correct index and index number raw_order: dict = request.getfixturevalue(order_fixture) + assert raw_order["samples"][0]["index_sequence"] == "" # WHEN validating the order order, _ = model_validator.validate(order=raw_order, model=order_model)