1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-20 02:48:57 +00:00

Convert test fixtures to async (#142052)

This commit is contained in:
Erik Montnemery
2025-04-02 14:05:07 +02:00
committed by GitHub
parent 93162f6b65
commit dfd86d56ec
24 changed files with 157 additions and 193 deletions

View File

@@ -26,12 +26,10 @@ def reset_log_level() -> Generator[None]:
@pytest.fixture
def provider(hass: HomeAssistant) -> hass_auth.HassAuthProvider:
async def provider(hass: HomeAssistant) -> hass_auth.HassAuthProvider:
"""Home Assistant auth provider."""
provider = hass.loop.run_until_complete(
register_auth_provider(hass, {"type": "homeassistant"})
)
hass.loop.run_until_complete(provider.async_initialize())
provider = await register_auth_provider(hass, {"type": "homeassistant"})
await provider.async_initialize()
return provider