From 628f49b39a1b3b58f0202c819eb9aecf7157046b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20Jer=C5=A1e?= Date: Wed, 3 Apr 2024 08:44:31 +0200 Subject: [PATCH] Fix tests --- resolwe_bio/tests/processes/test_chipseq.py | 2 -- .../tests/processes/test_diff_expression.py | 2 -- .../tests/processes/test_support_processors.py | 6 ------ resolwe_bio/tests/processes/test_wgs.py | 2 -- resolwe_bio/tests/unit/test_api.py | 14 +++----------- .../tests/unit/test_expression_filters.py | 17 +---------------- 6 files changed, 4 insertions(+), 39 deletions(-) diff --git a/resolwe_bio/tests/processes/test_chipseq.py b/resolwe_bio/tests/processes/test_chipseq.py index 11f8d610c..9ec24411e 100644 --- a/resolwe_bio/tests/processes/test_chipseq.py +++ b/resolwe_bio/tests/processes/test_chipseq.py @@ -625,7 +625,6 @@ def set_sample_name(data, sample_name): contributor=self.contributor, type="data:chipseq:callpeak:macs2:", entity_type="sample", - entity_descriptor_schema="sample", input_schema=[ { "name": "src", @@ -679,7 +678,6 @@ def set_sample_name(data, sample_name): contributor=self.contributor, type="data:chipseq:callpeak:macs14:", entity_type="sample", - entity_descriptor_schema="sample", input_schema=[ { "name": "src", diff --git a/resolwe_bio/tests/processes/test_diff_expression.py b/resolwe_bio/tests/processes/test_diff_expression.py index 518923dfe..35c845ad7 100644 --- a/resolwe_bio/tests/processes/test_diff_expression.py +++ b/resolwe_bio/tests/processes/test_diff_expression.py @@ -203,7 +203,6 @@ def test_deseq2_nanostring(self): contributor=self.contributor, type="data:expression:nanostring:", entity_type="sample", - entity_descriptor_schema="sample", data_name="{{ src.file }}", input_schema=[ { @@ -311,7 +310,6 @@ def test_de_microarray(self): contributor=self.contributor, type="data:expression:microarray:", entity_type="sample", - entity_descriptor_schema="sample", data_name="{{ name }}", input_schema=[ { diff --git a/resolwe_bio/tests/processes/test_support_processors.py b/resolwe_bio/tests/processes/test_support_processors.py index 482ec22fd..ba7630056 100644 --- a/resolwe_bio/tests/processes/test_support_processors.py +++ b/resolwe_bio/tests/processes/test_support_processors.py @@ -185,7 +185,6 @@ def test_archive_samples_exp(self): requirements={"expression-engine": "jinja"}, data_name="Upload expression into exp output field", entity_type="sample", - entity_descriptor_schema="sample", input_schema=[ { "name": "exp", @@ -554,7 +553,6 @@ def set_sample_name(data, sample_name): }, }, entity_type="sample", - entity_descriptor_schema="sample", contributor=self.contributor, type="data:wgbs:bsrate:", input_schema=[ @@ -626,7 +624,6 @@ def set_sample_name(data, sample_name): }, }, entity_type="sample", - entity_descriptor_schema="sample", contributor=self.contributor, type="data:alignment:bam:walt:", input_schema=[ @@ -694,7 +691,6 @@ def set_sample_name(data, sample_name): }, }, entity_type="sample", - entity_descriptor_schema="sample", contributor=self.contributor, type="data:chipqc:", input_schema=[ @@ -756,7 +752,6 @@ def set_sample_name(data, sample_name): }, }, entity_type="sample", - entity_descriptor_schema="sample", contributor=self.contributor, type="data:chipseq:callpeak:macs2:", input_schema=[ @@ -843,7 +838,6 @@ def set_sample_name(data, sample_name): }, }, entity_type="sample", - entity_descriptor_schema="sample", contributor=self.contributor, type="data:nanostring:rcc:", input_schema=[ diff --git a/resolwe_bio/tests/processes/test_wgs.py b/resolwe_bio/tests/processes/test_wgs.py index 7dfb5dbdc..c9421c6f5 100755 --- a/resolwe_bio/tests/processes/test_wgs.py +++ b/resolwe_bio/tests/processes/test_wgs.py @@ -183,7 +183,6 @@ def test_gatk_genomicsdb(self): contributor=self.contributor, type="data:variants:gvcf:", entity_type="sample", - entity_descriptor_schema="sample", data_name="{{ gvcf.file }}", input_schema=[ { @@ -310,7 +309,6 @@ def test_gatk_genotypegvcfs(self): contributor=self.contributor, type="data:variants:gvcf:", entity_type="sample", - entity_descriptor_schema="sample", data_name="{{ gvcf.file }}", input_schema=[ { diff --git a/resolwe_bio/tests/unit/test_api.py b/resolwe_bio/tests/unit/test_api.py index ab077f858..9b6977d7e 100644 --- a/resolwe_bio/tests/unit/test_api.py +++ b/resolwe_bio/tests/unit/test_api.py @@ -1,10 +1,9 @@ -from django.contrib.auth import get_user_model from rest_framework import status from rest_framework.test import APIRequestFactory, force_authenticate -from resolwe.flow.models import Collection, Data, DescriptorSchema, Entity, Process -from resolwe.flow.views import CollectionViewSet, DataViewSet, EntityViewSet -from resolwe.test import ProcessTestCase, TestCase +from resolwe.flow.models import Data, Process +from resolwe.flow.views import DataViewSet +from resolwe.test import TestCase factory = APIRequestFactory() @@ -47,7 +46,6 @@ def setUp(self): version="1.0.0", contributor=self.contributor, entity_type="test-schema", - entity_descriptor_schema="test-schema", input_schema=[ {"name": "input_data", "type": "data:test:", "required": False} ], @@ -59,12 +57,6 @@ def setUp(self): ], ) - self.descriptor_schema = DescriptorSchema.objects.create( - slug="test-schema", - version="1.0.0", - contributor=self.contributor, - ) - self.data = [] for index in range(10): data = Data.objects.create( diff --git a/resolwe_bio/tests/unit/test_expression_filters.py b/resolwe_bio/tests/unit/test_expression_filters.py index ca47e3c8a..2b3552f80 100644 --- a/resolwe_bio/tests/unit/test_expression_filters.py +++ b/resolwe_bio/tests/unit/test_expression_filters.py @@ -1,6 +1,6 @@ from jinja2 import Environment, FunctionLoader -from resolwe.flow.models import Collection, Data, DescriptorSchema, Process, Relation +from resolwe.flow.models import Collection, Data, Process, Relation from resolwe.flow.models.annotations import ( AnnotationField, AnnotationGroup, @@ -21,11 +21,6 @@ def test_repl_groups(self): slug="test-process", contributor=self.contributor, entity_type="sample", - entity_descriptor_schema="sample", - ) - - DescriptorSchema.objects.create( - slug="sample", version="1.0.0", contributor=self.contributor ) collection = Collection.objects.create( @@ -149,10 +144,6 @@ def test_sample_annotation(self): slug="test-process", contributor=self.contributor, entity_type="sample", - entity_descriptor_schema="sample", - ) - DescriptorSchema.objects.create( - slug="sample", version="1.0.0", contributor=self.contributor ) d = Data.objects.create( @@ -198,7 +189,6 @@ def test_background_pairs(self): slug="test-process", contributor=self.contributor, entity_type="sample", - entity_descriptor_schema="sample", ) proc2 = Process.objects.create( @@ -206,14 +196,9 @@ def test_background_pairs(self): slug="test-process2", contributor=self.contributor, entity_type="sample", - entity_descriptor_schema="sample", input_schema=[{"name": "src", "type": "data:test:process:"}], ) - DescriptorSchema.objects.create( - slug="sample", version="1.0.0", contributor=self.contributor - ) - collection = Collection.objects.create( name="Test collection", contributor=self.contributor )