Improve imports in deCONZ tests (#41976)
* Improve imports in deconz tests * Add spacing
This commit is contained in:
1 parent
1b94ef69d8
commit
7eb532ddd0
15 files changed
+547
-398
No files matched your search
@@ -1,9 +1,11 @@
|
||||
"""deCONZ scene platform tests."""
|
||||
|
||||
from copy import deepcopy
|
||||
|
||||
from homeassistant.components import deconz
|
||||
from homeassistant.components.deconz import DOMAIN as DECONZ_DOMAIN
|
||||
from homeassistant.components.deconz.gateway import get_gateway_from_config_entry
|
||||
import homeassistant.components.scene as scene
|
||||
from homeassistant.components.scene import DOMAIN as SCENE_DOMAIN, SERVICE_TURN_ON
|
||||
from homeassistant.const import ATTR_ENTITY_ID
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from .test_gateway import DECONZ_WEB_REQUEST, setup_deconz_integration
|
||||
@@ -27,11 +29,11 @@ async def test_platform_manually_configured(hass):
|
||||
"""Test that we do not discover anything or try to set up a gateway."""
|
||||
assert (
|
||||
await async_setup_component(
|
||||
hass, scene.DOMAIN, {"scene": {"platform": deconz.DOMAIN}}
|
||||
hass, SCENE_DOMAIN, {"scene": {"platform": DECONZ_DOMAIN}}
|
||||
)
|
||||
is True
|
||||
)
|
||||
assert deconz.DOMAIN not in hass.data
|
||||
assert DECONZ_DOMAIN not in hass.data
|
||||
|
||||
|
||||
async def test_no_scenes(hass):
|
||||
@@ -58,7 +60,10 @@ async def test_scenes(hass):
|
||||
|
||||
with patch.object(group_scene, "_request", return_value=True) as set_callback:
|
||||
await hass.services.async_call(
|
||||
"scene", "turn_on", {"entity_id": "scene.light_group_scene"}, blocking=True
|
||||
SCENE_DOMAIN,
|
||||
SERVICE_TURN_ON,
|
||||
{ATTR_ENTITY_ID: "scene.light_group_scene"},
|
||||
blocking=True,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
set_callback.assert_called_with("put", "/groups/1/scenes/1/recall", json={})
|
||||
|
||||
Reference in new issue
Block a user