From e145763d8619704f18e1e1eea5cb2ad6d700f75b Mon Sep 17 00:00:00 2001 From: Nile Wilson Date: Thu, 13 Jul 2023 16:55:49 -0400 Subject: [PATCH] Renaming test and removing redundancy in unit test for dicom image redactor --- .../tests/test_dicom_image_redactor_engine.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/presidio-image-redactor/tests/test_dicom_image_redactor_engine.py b/presidio-image-redactor/tests/test_dicom_image_redactor_engine.py index 3e8d90d3e..6dddb3a57 100644 --- a/presidio-image-redactor/tests/test_dicom_image_redactor_engine.py +++ b/presidio-image-redactor/tests/test_dicom_image_redactor_engine.py @@ -1174,16 +1174,12 @@ def test_add_redact_box_happy_path( ) def test_DicomImageRedactorEngine_redact_and_return_bbox( mocker, - mock_engine: DicomImageRedactorEngine, dcm_path: str, ): """Test happy path for DicomImageRedactorEngine redact_and_return_bbox() Args: - mock_engine (DicomImageRedactorEngine): DicomImageRedactorEngine object. dcm_path (str): Path to input DICOM file or dir. - output_dir (str): Path to parent directory to write output to. - overwrite (bool): True if overwriting original files. """ # Arrange test_image = pydicom.dcmread(dcm_path) @@ -1300,7 +1296,6 @@ def test_DicomImageRedactorEngine_redact_and_return_bbox_exceptions( @pytest.mark.parametrize( "dcm_path", [ - (Path(TEST_DICOM_PARENT_DIR, "0_ORIGINAL.dcm")), (Path(TEST_DICOM_PARENT_DIR, "0_ORIGINAL.dcm")), (Path(TEST_DICOM_PARENT_DIR, "RGB_ORIGINAL.dcm")), (Path(TEST_DICOM_DIR_2, "1_ORIGINAL.DCM")), @@ -1308,18 +1303,14 @@ def test_DicomImageRedactorEngine_redact_and_return_bbox_exceptions( (Path(TEST_DICOM_DIR_3, "3_ORIGINAL.DICOM")), ], ) -def test_DicomImageRedactorEngine_happy_path( +def test_DicomImageRedactorEngine_redact_happy_path( mocker, - mock_engine: DicomImageRedactorEngine, dcm_path: str, ): """Test happy path for DicomImageRedactorEngine redact() Args: - mock_engine (DicomImageRedactorEngine): DicomImageRedactorEngine object. dcm_path (str): Path to input DICOM file or dir. - output_dir (str): Path to parent directory to write output to. - overwrite (bool): True if overwriting original files. """ # Arrange test_image = pydicom.dcmread(dcm_path)