From aa46d4112e3d0ad0bbeec841e68e9211da9ebd7d Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 26 Nov 2025 10:49:11 -0600 Subject: [PATCH] fix test --- frigate/test/http_api/test_http_media.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/frigate/test/http_api/test_http_media.py b/frigate/test/http_api/test_http_media.py index 4bad4f04d..6af3dd972 100644 --- a/frigate/test/http_api/test_http_media.py +++ b/frigate/test/http_api/test_http_media.py @@ -206,6 +206,14 @@ class TestHttpMedia(BaseTestHttp): march_10_afternoon = tz.localize(datetime(2024, 3, 10, 15, 0, 0)).timestamp() with AuthTestClient(self.app) as client: + # Override allowed cameras for this test to include both + async def mock_get_allowed_cameras_for_filter(_request: Request): + return ["front_door", "back_door"] + + self.app.dependency_overrides[get_allowed_cameras_for_filter] = ( + mock_get_allowed_cameras_for_filter + ) + # Insert recordings for front_door on March 9 Recordings.insert( id="front_march_9", @@ -246,6 +254,14 @@ class TestHttpMedia(BaseTestHttp): assert summary["2024-03-09"] is True assert summary["2024-03-10"] is True + # Reset dependency override back to default single camera for other tests + async def reset_allowed_cameras(_request: Request): + return ["front_door"] + + self.app.dependency_overrides[get_allowed_cameras_for_filter] = ( + reset_allowed_cameras + ) + def test_recordings_summary_at_dst_transition_time(self): """ Test recordings that span the exact DST transition time.