1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Fix Cloud Google/Alexa check (#46681)

This commit is contained in:
Paulus Schoutsen
2021-02-16 21:49:53 -08:00
committed by GitHub
parent 58f6db0127
commit b956a571f4
5 changed files with 54 additions and 5 deletions

View File

@@ -43,7 +43,20 @@ def mock_cloud_login(hass, mock_cloud_setup):
hass.data[const.DOMAIN].id_token = jwt.encode(
{
"email": "hello@home-assistant.io",
"custom:sub-exp": "2018-01-03",
"custom:sub-exp": "2300-01-03",
"cognito:username": "abcdefghjkl",
},
"test",
)
@pytest.fixture
def mock_expired_cloud_login(hass, mock_cloud_setup):
"""Mock cloud is logged in."""
hass.data[const.DOMAIN].id_token = jwt.encode(
{
"email": "hello@home-assistant.io",
"custom:sub-exp": "2018-01-01",
"cognito:username": "abcdefghjkl",
},
"test",