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:
1 parent
d0ddc28f96
commit
dd45e99302
23 files changed
+499
-520
No files matched your search
@@ -6,9 +6,11 @@ from homeassistant.const import (
|
||||
STATE_LOCKED, STATE_UNLOCKED, STATE_UNAVAILABLE, ATTR_ASSUMED_STATE)
|
||||
import homeassistant.components.lock as lock
|
||||
from homeassistant.components.mqtt.discovery import async_start
|
||||
|
||||
from tests.common import (
|
||||
mock_mqtt_component, async_fire_mqtt_message, fire_mqtt_message,
|
||||
get_test_home_assistant)
|
||||
from tests.components.lock import common
|
||||
|
||||
|
||||
class TestLockMQTT(unittest.TestCase):
|
||||
@@ -69,7 +71,7 @@ class TestLockMQTT(unittest.TestCase):
|
||||
self.assertEqual(STATE_UNLOCKED, state.state)
|
||||
self.assertTrue(state.attributes.get(ATTR_ASSUMED_STATE))
|
||||
|
||||
lock.lock(self.hass, 'lock.test')
|
||||
common.lock(self.hass, 'lock.test')
|
||||
self.hass.block_till_done()
|
||||
|
||||
self.mock_publish.async_publish.assert_called_once_with(
|
||||
@@ -78,7 +80,7 @@ class TestLockMQTT(unittest.TestCase):
|
||||
state = self.hass.states.get('lock.test')
|
||||
self.assertEqual(STATE_LOCKED, state.state)
|
||||
|
||||
lock.unlock(self.hass, 'lock.test')
|
||||
common.unlock(self.hass, 'lock.test')
|
||||
self.hass.block_till_done()
|
||||
|
||||
self.mock_publish.async_publish.assert_called_once_with(
|
||||
|
||||
Reference in new issue
Block a user