Skip to content

Commit fa67db0

Browse files
committed
Add dicom kind to test partial
1 parent c97b785 commit fa67db0

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

app/tests/components_tests/test_partial_templates.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from django.template.loader import render_to_string
44

55
from grandchallenge.components.models import InterfaceKindChoices
6+
from tests.cases_tests.factories import DICOMImageSetFactory
67
from tests.components_tests.factories import (
78
ComponentInterfaceFactory,
89
ComponentInterfaceValueFactory,
@@ -77,6 +78,14 @@
7778
dict(),
7879
"<a ",
7980
),
81+
( # DICOM_IMAGE_SET
82+
dict(
83+
kind=InterfaceKindChoices.DICOM_IMAGE_SET,
84+
store_in_database=False,
85+
),
86+
dict(),
87+
"<div ",
88+
),
8089
( # Broken / fallback
8190
dict(
8291
kind=InterfaceKindChoices.PANIMG_SEGMENTATION,
@@ -108,9 +117,12 @@ def test_civ(
108117
ContentFile(b"<bh:ff><bh:d8><bh:ff><bh:e0><bh:00><bh:10>JFIF"),
109118
)
110119

111-
if ci.kind == InterfaceKindChoices.PANIMG_IMAGE:
120+
if ci.kind in InterfaceKindChoices.PANIMG_IMAGE:
112121
civ.image = ImageFactory()
113122
ImageFileFactory(image=civ.image)
123+
elif ci.kind == InterfaceKindChoices.DICOM_IMAGE_SET:
124+
civ.image = ImageFactory()
125+
DICOMImageSetFactory(image=civ.image)
114126

115127
# Actually create the CIV
116128
if (

0 commit comments

Comments
 (0)