Convert getting and removing access tokens to normal functions (#108670)
This commit is contained in:
parent
904032e944
commit
2eea658fd8
14 changed files with 98 additions and 124 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue