Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorjerse committed Apr 15, 2024
1 parent 3425e37 commit 628f49b
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 39 deletions.
2 changes: 0 additions & 2 deletions resolwe_bio/tests/processes/test_chipseq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions resolwe_bio/tests/processes/test_diff_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[
{
Expand Down Expand Up @@ -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=[
{
Expand Down
6 changes: 0 additions & 6 deletions resolwe_bio/tests/processes/test_support_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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=[
Expand Down Expand Up @@ -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=[
Expand Down Expand Up @@ -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=[
Expand Down Expand Up @@ -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=[
Expand Down Expand Up @@ -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=[
Expand Down
2 changes: 0 additions & 2 deletions resolwe_bio/tests/processes/test_wgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[
{
Expand Down Expand Up @@ -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=[
{
Expand Down
14 changes: 3 additions & 11 deletions resolwe_bio/tests/unit/test_api.py
Original file line number Diff line number Diff line change
@@ -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()

Expand Down Expand Up @@ -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}
],
Expand All @@ -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(
Expand Down
17 changes: 1 addition & 16 deletions resolwe_bio/tests/unit/test_expression_filters.py
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -198,22 +189,16 @@ def test_background_pairs(self):
slug="test-process",
contributor=self.contributor,
entity_type="sample",
entity_descriptor_schema="sample",
)

proc2 = Process.objects.create(
type="data:test:process2:",
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
)
Expand Down

0 comments on commit 628f49b

Please sign in to comment.