Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorjerse committed Nov 4, 2024
1 parent a619dda commit 382622a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
20 changes: 16 additions & 4 deletions resolwe_bio/tests/processes/test_expression_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def test_expression_aggregator(self):
)
entity = Sample.objects.get(data=expression1)
AnnotationValue.objects.create(
entity=entity, field=ann_field, value="artery"
entity=entity,
field=ann_field,
value="artery",
contributor=self.contributor,
)

expression2 = self.prepare_expression(
Expand All @@ -38,7 +41,10 @@ def test_expression_aggregator(self):
)
entity = Sample.objects.get(data=expression2)
AnnotationValue.objects.create(
entity=entity, field=ann_field, value="blood"
entity=entity,
field=ann_field,
value="blood",
contributor=self.contributor,
)

expression3 = self.prepare_expression(
Expand All @@ -50,7 +56,10 @@ def test_expression_aggregator(self):
)
entity = Sample.objects.get(data=expression3)
AnnotationValue.objects.create(
entity=entity, field=ann_field, value="artery"
entity=entity,
field=ann_field,
value="artery",
contributor=self.contributor,
)

expression4 = self.prepare_expression(
Expand All @@ -62,7 +71,10 @@ def test_expression_aggregator(self):
)
entity = Sample.objects.get(data=expression4)
AnnotationValue.objects.create(
entity=entity, field=ann_field, value="blood"
entity=entity,
field=ann_field,
value="blood",
contributor=self.contributor,
)

# Expect the process to fail if expression data from multiple species is used
Expand Down
4 changes: 3 additions & 1 deletion resolwe_bio/tests/unit/test_expression_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ def test_sample_annotation(self):
field = AnnotationField.objects.create(
name="field", sort_order=2, group=group, type=AnnotationType.STRING.value
)
AnnotationValue.objects.create(entity=entity, field=field, value="value")
AnnotationValue.objects.create(
entity=entity, field=field, value="value", contributor=self.contributor
)

def load_templates(template_name):
if template_name == "sample_annotation":
Expand Down

0 comments on commit 382622a

Please sign in to comment.