diff --git a/tests/unit_tests/test_espota2.py b/tests/unit_tests/test_espota2.py index cda5d8d222..e76bc99211 100644 --- a/tests/unit_tests/test_espota2.py +++ b/tests/unit_tests/test_espota2.py @@ -41,11 +41,8 @@ def mock_file() -> io.BytesIO: @pytest.fixture def mock_time(): """Mock time-related functions for consistent testing.""" - with ( - patch("time.sleep"), - patch("time.perf_counter", side_effect=[0, 1]), - ) as mocks: - yield mocks + with patch("time.sleep"), patch("time.perf_counter", side_effect=[0, 1]): + yield @pytest.fixture