Skip to content

Commit

Permalink
Update hass fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery committed May 7, 2024
1 parent b0fb5dc commit ea8df14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,13 @@ def exc_handle(loop, context):
orig_exception_handler(loop, context)

exceptions: list[Exception] = []
if AwesomeVersion(HA_VERSION) > "2023.6.0":
if AwesomeVersion(HA_VERSION) >= "2024.5.0":
context_manager = async_test_home_assistant_dev(event_loop, config_dir=tmpdir.strpath)
hass_obj = event_loop.run_until_complete(context_manager.__aenter__())
else:
hass_obj = event_loop.run_until_complete(
async_test_home_assistant_min_version(event_loop, config_dir=tmpdir.strpath)
context_manager = async_test_home_assistant_min_version(
event_loop, config_dir=tmpdir.strpath
)
hass_obj = event_loop.run_until_complete(context_manager.__aenter__())
event_loop.run_until_complete(async_setup_component(hass_obj, "homeassistant", {}))
with patch("homeassistant.components.python_script.setup", return_value=True):
assert event_loop.run_until_complete(async_setup_component(hass_obj, "python_script", {}))
Expand Down

0 comments on commit ea8df14

Please sign in to comment.