mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Black
This commit is contained in:
@@ -12,7 +12,7 @@ from . import mock_cloud, mock_cloud_prefs
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_user_data():
|
||||
"""Mock os module."""
|
||||
with patch('hass_nabucasa.Cloud.write_user_info') as writer:
|
||||
with patch("hass_nabucasa.Cloud.write_user_info") as writer:
|
||||
yield writer
|
||||
|
||||
|
||||
@@ -40,8 +40,11 @@ async def mock_cloud_setup(hass):
|
||||
@pytest.fixture
|
||||
def mock_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-03',
|
||||
'cognito:username': 'abcdefghjkl',
|
||||
}, 'test')
|
||||
hass.data[const.DOMAIN].id_token = jwt.encode(
|
||||
{
|
||||
"email": "hello@home-assistant.io",
|
||||
"custom:sub-exp": "2018-01-03",
|
||||
"cognito:username": "abcdefghjkl",
|
||||
},
|
||||
"test",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user