Fix Withings leaking time zone change into other tests (#30320)

* Fix Withings leaking time zone change in other tests

* Fix spelling error in code doc
This commit is contained in:
Franck Nijhof 2019-12-31 14:30:09 +01:00 committed by Paulus Schoutsen
parent bb14a083f0
commit 5414e9d155
1 changed files with 7 additions and 0 deletions

View File

@ -15,6 +15,13 @@ from homeassistant.core import HomeAssistant
from homeassistant.exceptions import PlatformNotReady
from homeassistant.util import dt
DEFAULT_TIME_ZONE = dt.DEFAULT_TIME_ZONE
def teardown():
"""Ensure the time zone is reverted after tests finish."""
dt.set_default_time_zone(DEFAULT_TIME_ZONE)
@pytest.fixture(name="withings_api")
def withings_api_fixture() -> WithingsApi: