diff --git a/frigate/test/test_restream.py b/frigate/test/test_restream.py index 5f637eec8..7170bf06b 100644 --- a/frigate/test/test_restream.py +++ b/frigate/test/test_restream.py @@ -1,6 +1,7 @@ """Test restream.py.""" from unittest import TestCase, main +from unittest.mock import patch from frigate.config import FrigateConfig from frigate.restream import RestreamApi @@ -42,14 +43,16 @@ class TestRestream(TestCase): }, } - def test_rtsp_stream(self) -> None: + @patch("frigate.restream.requests") + def test_rtsp_stream(self, mock_requests) -> None: """Test that the normal rtsp stream is sent plainly.""" frigate_config = FrigateConfig(**self.config) restream = RestreamApi(frigate_config) restream.add_cameras() assert restream.relays["back"].startswith("rtsp") - def test_http_stream(self) -> None: + @patch("frigate.restream.requests") + def test_http_stream(self, mock_requests) -> None: """Test that the http stream is sent via ffmpeg.""" frigate_config = FrigateConfig(**self.config) restream = RestreamApi(frigate_config)