Fix Météo-France I/O while testing (#31695)

* Fix Météo-France I/O while testing

* Review
pull/31705/head
Quentame 2020-02-10 17:00:22 +01:00 committed by GitHub
parent 7d0b50cadb
commit 9e41ee49cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

View File

@ -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