From 137070f29f87225f8c1295a840e28692105233c6 Mon Sep 17 00:00:00 2001 From: Carlos Martinez Date: Thu, 5 Mar 2026 15:25:26 +0000 Subject: [PATCH] Make test_existing_sop_instance_uid better match implementation --- tests/services/dicom/test_c_store.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/services/dicom/test_c_store.py b/tests/services/dicom/test_c_store.py index 31d5816e..679cd0fd 100644 --- a/tests/services/dicom/test_c_store.py +++ b/tests/services/dicom/test_c_store.py @@ -47,10 +47,11 @@ def test_no_patient_id_fails(self, mock_storage, mock_event): assert subject.call(mock_event) == FAILURE def test_existing_sop_instance_uid(self, mock_storage, mock_event): - mock_storage.instance_exists.return_value = True + mock_storage.store_instance.side_effect = pydicom.uid.generate_uid() subject = CStore(mock_storage) assert subject.call(mock_event) == SUCCESS + mock_storage.store_instance.assert_called_once() def test_valid_event_is_stored(self, mock_storage, mock_event): mock_storage.instance_exists.return_value = False