Fix Google Mail expired authorization (#102735)
* Fix Google Mail expired authorization * add test * raise HomeAssistantError * handle in api module * uno mas
This commit is contained in:
parent
ba7dbc5927
commit
7dbe0c3a48
4 changed files with 49 additions and 22 deletions
|
@ -73,8 +73,13 @@ async def test_expired_token_refresh_success(
|
|||
http.HTTPStatus.INTERNAL_SERVER_ERROR,
|
||||
ConfigEntryState.SETUP_RETRY,
|
||||
),
|
||||
(
|
||||
time.time() - 3600,
|
||||
http.HTTPStatus.BAD_REQUEST,
|
||||
ConfigEntryState.SETUP_ERROR,
|
||||
),
|
||||
],
|
||||
ids=["failure_requires_reauth", "transient_failure"],
|
||||
ids=["failure_requires_reauth", "transient_failure", "revoked_auth"],
|
||||
)
|
||||
async def test_expired_token_refresh_failure(
|
||||
hass: HomeAssistant,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue