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

Only create cloud user if cloud in use (#29150)

* Only create cloud user if cloud in use

* Pass context to alexa

* Update requirements

* Fix handing & design pattern for 0.30

* fix tests

* Fix lint & tests

* rename internal user
This commit is contained in:
Paulus Schoutsen
2019-11-28 05:23:59 -08:00
committed by Pascal Vizeli
parent 5d5d053bce
commit b847d55077
15 changed files with 221 additions and 145 deletions

View File

@@ -15,6 +15,7 @@ async def test_google_update_report_state(hass, cloud_prefs):
config = CloudGoogleConfig(
hass,
GACTIONS_SCHEMA({}),
"mock-user-id",
cloud_prefs,
Mock(claims={"cognito:username": "abcdefghjkl"}),
)
@@ -37,6 +38,7 @@ async def test_sync_entities(aioclient_mock, hass, cloud_prefs):
config = CloudGoogleConfig(
hass,
GACTIONS_SCHEMA({}),
"mock-user-id",
cloud_prefs,
Mock(
google_actions_sync_url="http://example.com",
@@ -52,6 +54,7 @@ async def test_google_update_expose_trigger_sync(hass, cloud_prefs):
config = CloudGoogleConfig(
hass,
GACTIONS_SCHEMA({}),
"mock-user-id",
cloud_prefs,
Mock(claims={"cognito:username": "abcdefghjkl"}),
)
@@ -90,7 +93,7 @@ async def test_google_update_expose_trigger_sync(hass, cloud_prefs):
async def test_google_entity_registry_sync(hass, mock_cloud_login, cloud_prefs):
"""Test Google config responds to entity registry."""
config = CloudGoogleConfig(
hass, GACTIONS_SCHEMA({}), cloud_prefs, hass.data["cloud"]
hass, GACTIONS_SCHEMA({}), "mock-user-id", cloud_prefs, hass.data["cloud"]
)
with patch.object(