@@ -188,6 +188,44 @@ def test_list_threads_with_select_param(self, http_client_list_response):
188188
189189 # The actual response validation is handled by the mock in conftest.py
190190 assert result is not None
191+
192+ def test_list_threads_with_earliest_message_date_param (self , http_client_list_response ):
193+ threads = Threads (http_client_list_response )
194+
195+ timestamp = 1672531200
196+
197+ http_client_list_response ._execute .return_value = {
198+ "request_id" : "abc-123" ,
199+ "data" : [{
200+ "id" : "thread-123" ,
201+ "has_attachments" : False ,
202+ "earliest_message_date" : 1672617600 ,
203+ "participants" : [
204+ {"email" : "test@example.com" , "name" : "Test User" }
205+ ],
206+ "snippet" : "Test snippet" ,
207+ "unread" : False ,
208+ "subject" : "Test subject" ,
209+ "message_ids" : ["msg-123" ],
210+ "folders" : ["folder-123" ]
211+ }]
212+ }
213+
214+ result = threads .list (
215+ identifier = "abc-123" ,
216+ query_params = {"earliest_message_date" : timestamp }
217+ )
218+
219+ http_client_list_response ._execute .assert_called_with (
220+ "GET" ,
221+ "/v3/grants/abc-123/threads" ,
222+ None ,
223+ {"earliest_message_date" : timestamp },
224+ None ,
225+ overrides = None ,
226+ )
227+
228+ assert result is not None
191229
192230 def test_find_thread (self , http_client_response ):
193231 threads = Threads (http_client_response )
0 commit comments