Add cloud pref for Google unlock (#18600)
This commit is contained in:
parent
b7742999cf
commit
d9c7f777c5
8 changed files with 103 additions and 66 deletions
|
@ -7,8 +7,9 @@ import pytest
|
|||
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.components.cloud import (
|
||||
Cloud, iot, auth_api, MODE_DEV, STORAGE_ENABLE_ALEXA,
|
||||
STORAGE_ENABLE_GOOGLE)
|
||||
Cloud, iot, auth_api, MODE_DEV)
|
||||
from homeassistant.components.cloud.const import (
|
||||
PREF_ENABLE_ALEXA, PREF_ENABLE_GOOGLE)
|
||||
from tests.components.alexa import test_smart_home as test_alexa
|
||||
from tests.common import mock_coro
|
||||
|
||||
|
@ -308,7 +309,7 @@ def test_handler_alexa(hass):
|
|||
@asyncio.coroutine
|
||||
def test_handler_alexa_disabled(hass, mock_cloud_fixture):
|
||||
"""Test handler Alexa when user has disabled it."""
|
||||
mock_cloud_fixture[STORAGE_ENABLE_ALEXA] = False
|
||||
mock_cloud_fixture[PREF_ENABLE_ALEXA] = False
|
||||
|
||||
resp = yield from iot.async_handle_alexa(
|
||||
hass, hass.data['cloud'],
|
||||
|
@ -377,7 +378,7 @@ def test_handler_google_actions(hass):
|
|||
|
||||
async def test_handler_google_actions_disabled(hass, mock_cloud_fixture):
|
||||
"""Test handler Google Actions when user has disabled it."""
|
||||
mock_cloud_fixture[STORAGE_ENABLE_GOOGLE] = False
|
||||
mock_cloud_fixture[PREF_ENABLE_GOOGLE] = False
|
||||
|
||||
with patch('homeassistant.components.cloud.Cloud.async_start',
|
||||
return_value=mock_coro()):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue