2626from notifiers .exceptions import BadArguments
2727
2828from medichaser import (
29+ DEFAULT_SLOT_SEARCH_TYPE ,
2930 AppointmentFinder ,
3031 Authenticator ,
3132 InvalidGrantError ,
@@ -460,6 +461,10 @@ def test_find_appointments_basic(self, monkeypatch: pytest.MonkeyPatch) -> None:
460461
461462 assert result == [{"id" : 1 }, {"id" : 2 }]
462463 mock_http_get .assert_called_once ()
464+ call_args = mock_http_get .call_args
465+ assert call_args is not None
466+ params : dict [str , Any ] = call_args .args [1 ]
467+ assert params ["SlotSearchType" ] == DEFAULT_SLOT_SEARCH_TYPE
463468
464469 def test_find_appointments_with_filters (
465470 self , monkeypatch : pytest .MonkeyPatch
@@ -486,6 +491,7 @@ def test_find_appointments_with_filters(
486491 call_args = mock_http_get .call_args
487492 assert call_args is not None
488493 params : dict [str , Any ] = call_args .args [1 ]
494+ assert params ["SlotSearchType" ] == DEFAULT_SLOT_SEARCH_TYPE
489495 assert "DoctorLanguageIds" in params
490496 assert "DoctorIds" in params
491497
@@ -534,6 +540,10 @@ def test_find_filters(self, monkeypatch: pytest.MonkeyPatch) -> None:
534540
535541 assert result == {"regions" : [{"id" : 1 }]}
536542 mock_http_get .assert_called_once ()
543+ call_args = mock_http_get .call_args
544+ assert call_args is not None
545+ params : dict [str , Any ] = call_args .args [1 ]
546+ assert params ["SlotSearchType" ] == DEFAULT_SLOT_SEARCH_TYPE
537547
538548
539549class TestNotifier :
@@ -1099,6 +1109,7 @@ def test_main_find_appointment_single_run(monkeypatch: pytest.MonkeyPatch) -> No
10991109 interval = None ,
11001110 notification = "pushbullet" ,
11011111 title = "Test" ,
1112+ slot_search_type = "DiagnosticProcedure" ,
11021113 )
11031114
11041115 mock_parser = MagicMock ()
@@ -1133,7 +1144,14 @@ def test_main_find_appointment_single_run(monkeypatch: pytest.MonkeyPatch) -> No
11331144 mock_auth_instance .login .assert_called_once ()
11341145 mock_auth_instance .refresh_token .assert_called_once ()
11351146 mock_finder_instance .find_appointments .assert_called_once_with (
1136- 1 , [2 ], 3 , datetime .date (2025 , 1 , 1 ), datetime .date (2025 , 1 , 31 ), 6 , 4
1147+ 1 ,
1148+ [2 ],
1149+ 3 ,
1150+ datetime .date (2025 , 1 , 1 ),
1151+ datetime .date (2025 , 1 , 31 ),
1152+ 6 ,
1153+ 4 ,
1154+ "DiagnosticProcedure" ,
11371155 )
11381156 mock_display .assert_called_once_with ([{"id" : 1 , "name" : "Appointment" }])
11391157 mock_notifier .assert_called_once_with (
@@ -1248,6 +1266,7 @@ def test_main_find_appointment_interval_run(monkeypatch: pytest.MonkeyPatch) ->
12481266 interval = 10 ,
12491267 notification = "pushover" ,
12501268 title = "Interval Test" ,
1269+ slot_search_type = DEFAULT_SLOT_SEARCH_TYPE ,
12511270 )
12521271
12531272 mock_parser = MagicMock ()
0 commit comments