hass-core/tests/components/alexa/test_entities.py
Paulus Schoutsen 7e2278f1cc
Clean up Alexa smart home code ()
* Clean up Alexa smart home code

* lint

* Lint

* Lint
2019-06-13 08:43:57 -07:00

19 lines
569 B
Python

"""Test Alexa entity representation."""
from homeassistant.components.alexa import smart_home
from . import get_new_request, DEFAULT_CONFIG
async def test_unsupported_domain(hass):
"""Discovery ignores entities of unknown domains."""
request = get_new_request('Alexa.Discovery', 'Discover')
hass.states.async_set(
'woz.boop', 'on', {'friendly_name': "Boop Woz"})
msg = await smart_home.async_handle_message(
hass, DEFAULT_CONFIG, request)
assert 'event' in msg
msg = msg['event']
assert not msg['payload']['endpoints']