@@ -218,3 +218,60 @@ async def test_get_feeds_gtfs_rt_entity_types():
218218 assert isinstance (feed .entity_types , list )
219219 for entity_type in feed .entity_types :
220220 assert entity_type in ["vp" , "tu" , "sa" ]
221+
222+
223+ @pytest .mark .asyncio
224+ async def test_get_feeds_unpublished_status ():
225+ """
226+ Test get_feeds endpoint with unpublished operational status filter.
227+ Should return only feeds with unpublished status.
228+ """
229+ api = OperationsApiImpl ()
230+
231+ # Test with unpublished status filter
232+ response = await api .get_feeds (operation_status = "unpublished" )
233+ assert response is not None
234+ for feed in response .feeds :
235+ assert feed .operational_status == "unpublished"
236+
237+
238+ @pytest .mark .asyncio
239+ async def test_get_feeds_all_operational_statuses ():
240+ """
241+ Test get_feeds endpoint with all possible operational status values.
242+ Verifies that each operational status filter works correctly.
243+ """
244+ api = OperationsApiImpl ()
245+
246+ # Test each operational status
247+ for status in ["wip" , "published" , "unpublished" ]:
248+ response = await api .get_feeds (operation_status = status )
249+ assert response is not None
250+ for feed in response .feeds :
251+ assert feed .operational_status == status
252+
253+
254+ @pytest .mark .asyncio
255+ async def test_get_feeds_unpublished_with_data_type ():
256+ """
257+ Test get_feeds endpoint with unpublished status and data type filters combined.
258+ """
259+ api = OperationsApiImpl ()
260+
261+ gtfs_response = await api .get_feeds (
262+ operation_status = "unpublished" , data_type = "gtfs"
263+ )
264+ assert gtfs_response is not None
265+ for feed in gtfs_response .feeds :
266+ assert feed .operational_status == "unpublished"
267+ assert feed .data_type == "gtfs"
268+ assert isinstance (feed , GtfsFeedResponse )
269+
270+ rt_response = await api .get_feeds (
271+ operation_status = "unpublished" , data_type = "gtfs_rt"
272+ )
273+ assert rt_response is not None
274+ for feed in rt_response .feeds :
275+ assert feed .operational_status == "unpublished"
276+ assert feed .data_type == "gtfs_rt"
277+ assert isinstance (feed , GtfsRtFeedResponse )
0 commit comments