As a workaround, you could try adding this call to your test function:
slicer.modules.DICOMInstance.performPostModuleDiscoveryTasks()
As a workaround, you could try adding this call to your test function:
slicer.modules.DICOMInstance.performPostModuleDiscoveryTasks()