Intelligent timeout handler for setup/bootstrap (#38329)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com> Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
21 files changed
+901
-89
No files matched your search
@@ -46,6 +46,7 @@ async def test_get_actions(hass, device_reg, entity_reg):
|
||||
DOMAIN, "test", ent.unique_id, device_id=device_entry.id
|
||||
)
|
||||
assert await async_setup_component(hass, DOMAIN, {DOMAIN: {CONF_PLATFORM: "test"}})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
expected_actions = [
|
||||
{
|
||||
@@ -87,6 +88,7 @@ async def test_get_actions_tilt(hass, device_reg, entity_reg):
|
||||
DOMAIN, "test", ent.unique_id, device_id=device_entry.id
|
||||
)
|
||||
assert await async_setup_component(hass, DOMAIN, {DOMAIN: {CONF_PLATFORM: "test"}})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
expected_actions = [
|
||||
{
|
||||
@@ -140,6 +142,7 @@ async def test_get_actions_set_pos(hass, device_reg, entity_reg):
|
||||
DOMAIN, "test", ent.unique_id, device_id=device_entry.id
|
||||
)
|
||||
assert await async_setup_component(hass, DOMAIN, {DOMAIN: {CONF_PLATFORM: "test"}})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
expected_actions = [
|
||||
{
|
||||
@@ -169,6 +172,7 @@ async def test_get_actions_set_tilt_pos(hass, device_reg, entity_reg):
|
||||
DOMAIN, "test", ent.unique_id, device_id=device_entry.id
|
||||
)
|
||||
assert await async_setup_component(hass, DOMAIN, {DOMAIN: {CONF_PLATFORM: "test"}})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
expected_actions = [
|
||||
{
|
||||
@@ -217,6 +221,7 @@ async def test_get_action_capabilities(hass, device_reg, entity_reg):
|
||||
)
|
||||
|
||||
assert await async_setup_component(hass, DOMAIN, {DOMAIN: {CONF_PLATFORM: "test"}})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
actions = await async_get_device_automations(hass, "action", device_entry.id)
|
||||
assert len(actions) == 3 # open, close, stop
|
||||
@@ -244,6 +249,7 @@ async def test_get_action_capabilities_set_pos(hass, device_reg, entity_reg):
|
||||
)
|
||||
|
||||
assert await async_setup_component(hass, DOMAIN, {DOMAIN: {CONF_PLATFORM: "test"}})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
expected_capabilities = {
|
||||
"extra_fields": [
|
||||
@@ -286,6 +292,7 @@ async def test_get_action_capabilities_set_tilt_pos(hass, device_reg, entity_reg
|
||||
)
|
||||
|
||||
assert await async_setup_component(hass, DOMAIN, {DOMAIN: {CONF_PLATFORM: "test"}})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
expected_capabilities = {
|
||||
"extra_fields": [
|
||||
@@ -352,6 +359,7 @@ async def test_action(hass):
|
||||
]
|
||||
},
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
open_calls = async_mock_service(hass, "cover", "open_cover")
|
||||
close_calls = async_mock_service(hass, "cover", "close_cover")
|
||||
@@ -408,6 +416,7 @@ async def test_action_tilt(hass):
|
||||
]
|
||||
},
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
open_calls = async_mock_service(hass, "cover", "open_cover_tilt")
|
||||
close_calls = async_mock_service(hass, "cover", "close_cover_tilt")
|
||||
@@ -468,6 +477,7 @@ async def test_action_set_position(hass):
|
||||
]
|
||||
},
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
cover_pos_calls = async_mock_service(hass, "cover", "set_cover_position")
|
||||
tilt_pos_calls = async_mock_service(hass, "cover", "set_cover_tilt_position")
|
||||
|
||||
Reference in new issue
Block a user