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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user