Files
core/tests/components/august/test_camera.py
J. Nick Koston 693441e56f Deduplicate code in the august integration (#32101)
* Deduplicate code in the august integration

* Add additional tests for august (more coming)

* Door state is now updated when a lock or unlock call returns
  as the state is contained in the response which avoids
  the confusing out of sync state

* revert

* document known issue with doorsense and lock getting out of sync (pre-existing)

* Address review comments

* Additional review comments
2020-02-23 13:54:34 -08:00

19 lines
596 B
Python

"""The camera tests for the august platform."""
from homeassistant.const import STATE_IDLE
from tests.components.august.mocks import (
_create_august_with_devices,
_mock_doorbell_from_fixture,
)
async def test_create_doorbell(hass):
"""Test creation of a doorbell."""
doorbell_one = await _mock_doorbell_from_fixture(hass, "get_doorbell.json")
doorbell_details = [doorbell_one]
await _create_august_with_devices(hass, doorbell_details)
camera_k98gidt45gul_name = hass.states.get("camera.k98gidt45gul_name")
assert camera_k98gidt45gul_name.state == STATE_IDLE