File tree Expand file tree Collapse file tree
app/tests/components_tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33from django .template .loader import render_to_string
44
55from grandchallenge .components .models import InterfaceKindChoices
6+ from tests .cases_tests .factories import DICOMImageSetFactory
67from tests .components_tests .factories import (
78 ComponentInterfaceFactory ,
89 ComponentInterfaceValueFactory ,
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 (
You can’t perform that action at this time.
0 commit comments