@@ -107,6 +107,16 @@ def test_call_with_multiple_results(self, handler, mock_storage, mock_event):
107107 status , ds = results [3 ]
108108 assert status == SUCCESS
109109
110+ def test_call_with_accession_number_filter (self , handler , mock_storage , mock_event ):
111+ mock_event .identifier .AccessionNumber = "ACC12345"
112+ mock_storage .find_worklist_items .return_value = []
113+
114+ list (handler .call (mock_event ))
115+
116+ mock_storage .find_worklist_items .assert_called_once_with (
117+ accession_number = "ACC12345" , modality = None , scheduled_date = None , patient_id = None
118+ )
119+
110120 def test_call_with_modality_filter (self , handler , mock_storage , mock_event ):
111121 # Add modality to query
112122 sps_item = Dataset ()
@@ -116,7 +126,7 @@ def test_call_with_modality_filter(self, handler, mock_storage, mock_event):
116126
117127 list (handler .call (mock_event ))
118128
119- mock_storage .find_worklist_items .assert_called_once_with (modality = "MG" , scheduled_date = None , patient_id = None )
129+ mock_storage .find_worklist_items .assert_called_once_with (accession_number = None , modality = "MG" , scheduled_date = None , patient_id = None )
120130
121131 def test_call_with_date_filter (self , handler , mock_storage , mock_event ):
122132 sps_item = Dataset ()
@@ -127,7 +137,7 @@ def test_call_with_date_filter(self, handler, mock_storage, mock_event):
127137 list (handler .call (mock_event ))
128138
129139 mock_storage .find_worklist_items .assert_called_once_with (
130- modality = None , scheduled_date = "20260107" , patient_id = None
140+ accession_number = None , modality = None , scheduled_date = "20260107" , patient_id = None
131141 )
132142
133143 def test_call_with_patient_id_filter (self , handler , mock_storage , mock_event ):
@@ -137,7 +147,7 @@ def test_call_with_patient_id_filter(self, handler, mock_storage, mock_event):
137147 list (handler .call (mock_event ))
138148
139149 mock_storage .find_worklist_items .assert_called_once_with (
140- modality = None , scheduled_date = None , patient_id = "9876543210"
150+ accession_number = None , modality = None , scheduled_date = None , patient_id = "9876543210"
141151 )
142152
143153 def test_call_handles_storage_exception (self , handler , mock_storage , mock_event ):
0 commit comments