mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-15 22:10:12 +00:00
FileConfiguration uses executor for I/O (#5652)
* FileConfiguration uses executor for I/O * Fix credentials tests * Remove migrate_system_env as its very deprecated
This commit is contained in:
@@ -60,7 +60,7 @@ async def test_auth_request_without_backend_cache(
|
||||
mock_auth_backend.return_value = True
|
||||
mock_api_state.return_value = False
|
||||
|
||||
coresys.auth._update_cache("username", "password")
|
||||
await coresys.auth._update_cache("username", "password")
|
||||
|
||||
assert await coresys.auth.check_login(addon, "username", "password")
|
||||
assert not mock_auth_backend.called
|
||||
@@ -76,12 +76,12 @@ async def test_auth_request_with_backend_cache_update(
|
||||
mock_auth_backend.return_value = False
|
||||
mock_api_state.return_value = True
|
||||
|
||||
coresys.auth._update_cache("username", "password")
|
||||
await coresys.auth._update_cache("username", "password")
|
||||
|
||||
assert await coresys.auth.check_login(addon, "username", "password")
|
||||
|
||||
await asyncio.sleep(0)
|
||||
|
||||
assert mock_auth_backend.called
|
||||
coresys.auth._dismatch_cache("username", "password")
|
||||
await coresys.auth._dismatch_cache("username", "password")
|
||||
assert not await coresys.auth.check_login(addon, "username", "password")
|
||||
|
||||
Reference in New Issue
Block a user