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

Clean up Google Config (#24663)

* Clean up Google Config

* Lint

* pylint

* pylint2
This commit is contained in:
Paulus Schoutsen
2019-06-21 02:17:21 -07:00
committed by Pascal Vizeli
parent d468d0f71b
commit 78b7ed0ebe
12 changed files with 460 additions and 387 deletions

View File

@@ -29,10 +29,8 @@ from homeassistant.const import (
from homeassistant.core import State, DOMAIN as HA_DOMAIN, EVENT_CALL_SERVICE
from homeassistant.util import color
from tests.common import async_mock_service, mock_coro
from . import BASIC_CONFIG, MockConfig
BASIC_CONFIG = helpers.Config(
should_expose=lambda state: True,
)
REQ_ID = 'ff36a3cc-ec34-11e6-b1a0-64510650abcf'
@@ -42,8 +40,7 @@ BASIC_DATA = helpers.RequestData(
REQ_ID,
)
PIN_CONFIG = helpers.Config(
should_expose=lambda state: True,
PIN_CONFIG = MockConfig(
secure_devices_pin='1234'
)
@@ -927,7 +924,7 @@ async def test_lock_unlock_unlock(hass):
# Test with 2FA override
with patch('homeassistant.components.google_assistant.helpers'
'.Config.should_2fa', return_value=False):
'.AbstractConfig.should_2fa', return_value=False):
await trt.execute(
trait.COMMAND_LOCKUNLOCK, BASIC_DATA, {'lock': False}, {})
assert len(calls) == 2