deCONZ - Improve tests based on Martins feedback in Axis integration (#30438)

This commit is contained in:
Robert Svensson 2020-01-03 18:11:04 +01:00 committed by GitHub
parent 8a1fc8b8f0
commit ec61342ec3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 84 additions and 197 deletions

View file

@ -3,7 +3,7 @@ from copy import deepcopy
from homeassistant.components.deconz import device_trigger
from .test_gateway import DECONZ_WEB_REQUEST, ENTRY_CONFIG, setup_deconz_integration
from .test_gateway import DECONZ_WEB_REQUEST, setup_deconz_integration
from tests.common import assert_lists_same, async_get_device_automations
@ -34,9 +34,7 @@ async def test_get_triggers(hass):
"""Test triggers work."""
data = deepcopy(DECONZ_WEB_REQUEST)
data["sensors"] = deepcopy(SENSORS)
gateway = await setup_deconz_integration(
hass, ENTRY_CONFIG, options={}, get_state_response=data
)
gateway = await setup_deconz_integration(hass, get_state_response=data)
device_id = gateway.events[0].device_id
triggers = await async_get_device_automations(hass, "trigger", device_id)