Skip to content

Commit 12742c7

Browse files
Make test_existing_sop_instance_uid better match implementation (#42)
1 parent 4101945 commit 12742c7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/services/dicom/test_c_store.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ def test_no_patient_id_fails(self, mock_storage, mock_event):
4747
assert subject.call(mock_event) == FAILURE
4848

4949
def test_existing_sop_instance_uid(self, mock_storage, mock_event):
50-
mock_storage.instance_exists.return_value = True
50+
mock_storage.store_instance.side_effect = pydicom.uid.generate_uid()
5151
subject = CStore(mock_storage)
5252

5353
assert subject.call(mock_event) == SUCCESS
54+
mock_storage.store_instance.assert_called_once()
5455

5556
def test_valid_event_is_stored(self, mock_storage, mock_event):
5657
mock_storage.instance_exists.return_value = False

0 commit comments

Comments
 (0)