* Add context

* Add context to switch/light services

* Test set_state API

* Lint

* Fix tests

* Do not include context yet in comparison

* Do not pass in loop

* Fix Z-Wave tests

* Add websocket test without user
This commit is contained in:
Paulus Schoutsen authored and Jason Hu committed 2018-07-28 17:53:37 -07:00
1 parent 867f80715e
commit c7f4bdafc0
16 files changed
+363 -109

No files matched your search

+4 -4
View File
@@ -163,10 +163,10 @@ def test_zwave_ready_wait(hass, mock_openzwave):
asyncio_sleep = asyncio.sleep
@asyncio.coroutine
def sleep(duration, loop):
def sleep(duration, loop=None):
if duration > 0:
sleeps.append(duration)
yield from asyncio_sleep(0, loop=loop)
yield from asyncio_sleep(0)
with patch('homeassistant.components.zwave.dt_util.utcnow', new=utcnow):
with patch('asyncio.sleep', new=sleep):
@@ -248,10 +248,10 @@ async def test_unparsed_node_discovery(hass, mock_openzwave):
asyncio_sleep = asyncio.sleep
async def sleep(duration, loop):
async def sleep(duration, loop=None):
if duration > 0:
sleeps.append(duration)
await asyncio_sleep(0, loop=loop)
await asyncio_sleep(0)
with patch('homeassistant.components.zwave.dt_util.utcnow', new=utcnow):
with patch('asyncio.sleep', new=sleep):