From 9e41ee49cbe06bb53bbd5c6d5f3c17a009111b25 Mon Sep 17 00:00:00 2001 From: Quentame Date: Mon, 10 Feb 2020 17:00:22 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20M=C3=A9t=C3=A9o-France=20I/O=20while=20te?= =?UTF-8?q?sting=20(#31695)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix Météo-France I/O while testing * Review --- tests/components/meteo_france/conftest.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/components/meteo_france/conftest.py diff --git a/tests/components/meteo_france/conftest.py b/tests/components/meteo_france/conftest.py new file mode 100644 index 00000000000..088587ab2c2 --- /dev/null +++ b/tests/components/meteo_france/conftest.py @@ -0,0 +1,16 @@ +"""Meteo-France generic test utils.""" +from unittest.mock import patch + +import pytest + + +@pytest.fixture(autouse=True) +def patch_requests(): + """Stub out services that makes requests.""" + patch_client = patch("homeassistant.components.meteo_france.meteofranceClient") + patch_weather_alert = patch( + "homeassistant.components.meteo_france.VigilanceMeteoFranceProxy" + ) + + with patch_client, patch_weather_alert: + yield