Migrate remote to async (#4678)
* Migrate remote to async * add coro * remove sync from init since only used in harmony * import ATTR from remote * remove unused sync stuff from tests
This commit is contained in:
1 parent
8a4aace789
commit
7c3ae884df
4 files changed
+43
-58
No files matched your search
@@ -9,7 +9,6 @@ from homeassistant.const import (
|
||||
SERVICE_TURN_ON, SERVICE_TURN_OFF)
|
||||
from tests.common import get_test_home_assistant, mock_service
|
||||
|
||||
SERVICE_SYNC = 'sync'
|
||||
SERVICE_SEND_COMMAND = 'send_command'
|
||||
|
||||
|
||||
@@ -83,22 +82,6 @@ class TestDemoRemote(unittest.TestCase):
|
||||
self.assertEqual(SERVICE_TURN_OFF, call.service)
|
||||
self.assertEqual('entity_id_val', call.data[ATTR_ENTITY_ID])
|
||||
|
||||
# Test sync
|
||||
sync_calls = mock_service(
|
||||
self.hass, remote.DOMAIN, SERVICE_SYNC)
|
||||
|
||||
remote.sync(
|
||||
self.hass, entity_id='entity_id_val')
|
||||
|
||||
self.hass.block_till_done()
|
||||
|
||||
self.assertEqual(1, len(sync_calls))
|
||||
call = sync_calls[-1]
|
||||
|
||||
self.assertEqual(remote.DOMAIN, call.domain)
|
||||
self.assertEqual(SERVICE_SYNC, call.service)
|
||||
self.assertEqual('entity_id_val', call.data[ATTR_ENTITY_ID])
|
||||
|
||||
# Test send_command
|
||||
send_command_calls = mock_service(
|
||||
self.hass, remote.DOMAIN, SERVICE_SEND_COMMAND)
|
||||
|
||||
@@ -11,7 +11,6 @@ import homeassistant.components.remote as remote
|
||||
|
||||
from tests.common import mock_service, get_test_home_assistant
|
||||
TEST_PLATFORM = {remote.DOMAIN: {CONF_PLATFORM: 'test'}}
|
||||
SERVICE_SYNC = 'sync'
|
||||
SERVICE_SEND_COMMAND = 'send_command'
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user