Remove service helper (4) (#16892)

* Update media_player

* Update lock

* Update notify

* Update remote

* Update scene

* Update vacuum

* Remove timer helpers

* Removed unused legacy helpers
This commit is contained in:
cdce8p 2018-09-26 18:02:05 +02:00 committed by Paulus Schoutsen
parent d0ddc28f96
commit dd45e99302
23 changed files with 499 additions and 520 deletions

View file

@ -10,6 +10,8 @@ from homeassistant.const import (
import homeassistant.components.remote as remote
from tests.common import mock_service, get_test_home_assistant
from tests.components.remote import common
TEST_PLATFORM = {remote.DOMAIN: {CONF_PLATFORM: 'test'}}
SERVICE_SEND_COMMAND = 'send_command'
@ -46,7 +48,7 @@ class TestRemote(unittest.TestCase):
turn_on_calls = mock_service(
self.hass, remote.DOMAIN, SERVICE_TURN_ON)
remote.turn_on(
common.turn_on(
self.hass,
entity_id='entity_id_val')
@ -62,7 +64,7 @@ class TestRemote(unittest.TestCase):
turn_off_calls = mock_service(
self.hass, remote.DOMAIN, SERVICE_TURN_OFF)
remote.turn_off(
common.turn_off(
self.hass, entity_id='entity_id_val')
self.hass.block_till_done()
@ -79,7 +81,7 @@ class TestRemote(unittest.TestCase):
send_command_calls = mock_service(
self.hass, remote.DOMAIN, SERVICE_SEND_COMMAND)
remote.send_command(
common.send_command(
self.hass, entity_id='entity_id_val',
device='test_device', command=['test_command'],
num_repeats='4', delay_secs='0.6')