mirror of
https://github.com/home-assistant/core.git
synced 2025-11-16 14:30:22 +00:00
Convert getting and removing access tokens to normal functions (#108670)
This commit is contained in:
@@ -588,7 +588,7 @@ async def test_api_fire_event_context(
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
refresh_token = await hass.auth.async_validate_access_token(hass_access_token)
|
||||
refresh_token = hass.auth.async_validate_access_token(hass_access_token)
|
||||
|
||||
assert len(test_value) == 1
|
||||
assert test_value[0].context.user_id == refresh_token.user.id
|
||||
@@ -606,7 +606,7 @@ async def test_api_call_service_context(
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
refresh_token = await hass.auth.async_validate_access_token(hass_access_token)
|
||||
refresh_token = hass.auth.async_validate_access_token(hass_access_token)
|
||||
|
||||
assert len(calls) == 1
|
||||
assert calls[0].context.user_id == refresh_token.user.id
|
||||
@@ -622,7 +622,7 @@ async def test_api_set_state_context(
|
||||
headers={"authorization": f"Bearer {hass_access_token}"},
|
||||
)
|
||||
|
||||
refresh_token = await hass.auth.async_validate_access_token(hass_access_token)
|
||||
refresh_token = hass.auth.async_validate_access_token(hass_access_token)
|
||||
|
||||
state = hass.states.get("light.kitchen")
|
||||
assert state.context.user_id == refresh_token.user.id
|
||||
|
||||
Reference in New Issue
Block a user