Convert test helpers to get hass instance to contextmanagers (#109990)

* Convert get_test_home_assistant helper to contextmanager

* Convert async_test_home_assistant helper to contextmanager

* Move timezone reset to async_test_home_assistant helper
This commit is contained in:
Marc Mueller 2024-02-11 21:23:51 +01:00 committed by GitHub
parent 3342e6ddbd
commit 2ef2172b01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 750 additions and 784 deletions

View file

@ -36,8 +36,6 @@ from .common import async_wait_recording_done, create_engine_test
from tests.common import async_fire_time_changed
ORIG_TZ = dt_util.DEFAULT_TIME_ZONE
def _get_native_states(hass, entity_id):
with session_scope(hass=hass, read_only=True) as session: