tests.data_import package¶
Submodules¶
tests.data_import.test_import_image module¶
-
class
tests.data_import.test_import_image.
ImportImageTestCase
(methodName='runTest')¶ Bases:
django.test.testcases.TestCase
Tests for the
ImportImage
class which is meant to handle the addition of new DICOM images to the database.-
classmethod
setUpTestData
()¶ Creates
Series
,Study
, andPatient
instances to test for cases in which we add DICOM images under these conditions (related entities exist). For more information see Django’sTestCase
documentation.
-
tearDown
()¶ Delete any temporary files that may have been created during the
Image
instance’s creation. For more information see unittest’stearDown()
method.
-
test_create_image
()¶
-
test_generate_entities_and_relationships
()¶
-
test_get_entity_uid_from_header
()¶
-
test_get_image_destination
()¶
-
test_get_or_create_entity_with_existing_entities
()¶
-
test_get_or_create_entity_with_missing_entities
()¶
-
test_move_image_to_destination
()¶
-
test_run_with_different_integrity_error
()¶
-
test_run_with_different_patient_and_different_study
()¶
-
test_run_with_different_patient_and_same_study
()¶
-
test_run_with_different_series_but_same_patient_and_study
()¶
-
test_run_with_different_study_and_same_patient
()¶
-
test_run_with_integrity_error_handler
()¶
-
test_store_file
()¶
-
classmethod
tests.data_import.test_local_import module¶
-
class
tests.data_import.test_local_import.
LocalImportTestCase
(methodName='runTest')¶ Bases:
django.test.testcases.TestCase
Tests for the
LocalImport
class, which is meant to provide methods to facilitate data import.-
tearDown
()¶ Tries to remove the
Image
instances that may have been created during each test, as well as the destination directory. For more information see unittest’stearDown()
method.
-
test_import_dcm_files
()¶ Tests importing multiple DICOM images at once using the
import_dcm_files()
method.
-
test_import_local_dcm
()¶ Tests importing a single DICOM image from some path using
import_local_dcm()
.
-
test_import_local_zip_archive
()¶ Tests importing DICOM images from a single ZIP archive using
import_local_zip_archive()
.
-
test_import_zip_archives
()¶ Tests importing DICOM images from multiple ZIP archives at once using the
import_zip_archives()
method.
-
test_initialization
()¶ Tests that the
LocalImport
class is initialized properly.
-
test_path_generator_with_extension
()¶ Tests the
path_generator()
method with the extension parameter set.
-
test_path_generator_without_extension
()¶ Tests the
path_generator()
method with no extension parameter setting.
-
test_run_default_configuration
()¶ Tests the
LocalImport
class’srun()
method’s default configuration is to include ZIP archives.
-
test_run_with_zip_archives
()¶ Tests the
LocalImport
class’srun()
method when set to include ZIP archives.
-
test_run_without_zip_archives
()¶ Tests the
LocalImport
class’srun()
method when set to exclude ZIP archives.
-