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

Retry keyset cloud (#12270)

* Use less threads in helpers.event tests

* Add helpers.event.async_call_later

* Cloud: retry fetching keyset
This commit is contained in:
Paulus Schoutsen
2018-02-10 02:40:24 -08:00
committed by Pascal Vizeli
parent 134445f622
commit f2296e1ff8
6 changed files with 66 additions and 40 deletions

View File

@@ -266,8 +266,8 @@ def test_handler_alexa(hass):
hass.states.async_set(
'switch.test2', 'on', {'friendly_name': "Test switch 2"})
with patch('homeassistant.components.cloud.Cloud.initialize',
return_value=mock_coro(True)):
with patch('homeassistant.components.cloud.Cloud.async_start',
return_value=mock_coro()):
setup = yield from async_setup_component(hass, 'cloud', {
'cloud': {
'alexa': {
@@ -309,8 +309,8 @@ def test_handler_google_actions(hass):
hass.states.async_set(
'switch.test2', 'on', {'friendly_name': "Test switch 2"})
with patch('homeassistant.components.cloud.Cloud.initialize',
return_value=mock_coro(True)):
with patch('homeassistant.components.cloud.Cloud.async_start',
return_value=mock_coro()):
setup = yield from async_setup_component(hass, 'cloud', {
'cloud': {
'google_actions': {