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 authored and Pascal Vizeli committed 2019-11-28 14:23:59 +01:00
1 parent 5d5d053bce
commit b847d55077
15 files changed
+221 -145

No files matched your search

+4 -1
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(