Split mock_service (#8198)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2017-06-25 10:53:15 -07:00
1 parent 1cfed4f015
commit 7bf6ceafec
4 files changed
+21 -19

No files matched your search

+3 -2
View File
@@ -16,7 +16,8 @@ from homeassistant.helpers import entity
from homeassistant.util.async import run_coroutine_threadsafe
from tests.common import (
get_test_home_assistant, mock_service, patch_yaml_files, mock_coro)
get_test_home_assistant, mock_service, patch_yaml_files, mock_coro,
async_mock_service)
class TestComponentsCore(unittest.TestCase):
@@ -77,7 +78,7 @@ class TestComponentsCore(unittest.TestCase):
@patch('homeassistant.core.ServiceRegistry.call')
def test_turn_on_to_not_block_for_domains_without_service(self, mock_call):
"""Test if turn_on is blocking domain with no service."""
mock_service(self.hass, 'light', SERVICE_TURN_ON)
async_mock_service(self.hass, 'light', SERVICE_TURN_ON)
# We can't test if our service call results in services being called
# because by mocking out the call service method, we mock out all