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:
parent
bb14a083f0
commit
5414e9d155
1 changed files with 7 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue