Grammar and spelling fixes (#16065)
This commit is contained in:
1 parent
9e1fa7ef42
commit
dbd0763f83
244 files changed
+453
-453
No files matched your search
@@ -16,7 +16,7 @@ class TestHelpersDiscovery:
|
||||
"""Tests for discovery helper methods."""
|
||||
|
||||
def setup_method(self, method):
|
||||
"""Setup things to be run when tests are started."""
|
||||
"""Set up things to be run when tests are started."""
|
||||
self.hass = get_test_home_assistant()
|
||||
|
||||
def teardown_method(self, method):
|
||||
@@ -117,7 +117,7 @@ class TestHelpersDiscovery:
|
||||
platform_calls = []
|
||||
|
||||
def component_setup(hass, config):
|
||||
"""Setup mock component."""
|
||||
"""Set up mock component."""
|
||||
discovery.load_platform(hass, 'switch', 'test_circular', 'disc',
|
||||
config)
|
||||
component_calls.append(1)
|
||||
@@ -125,7 +125,7 @@ class TestHelpersDiscovery:
|
||||
|
||||
def setup_platform(hass, config, add_devices_callback,
|
||||
discovery_info=None):
|
||||
"""Setup mock platform."""
|
||||
"""Set up mock platform."""
|
||||
platform_calls.append('disc' if discovery_info else 'component')
|
||||
|
||||
loader.set_component(
|
||||
@@ -158,21 +158,21 @@ class TestHelpersDiscovery:
|
||||
def test_1st_discovers_2nd_component(self, mock_signal):
|
||||
"""Test that we don't break if one component discovers the other.
|
||||
|
||||
If the first component fires a discovery event to setup the
|
||||
second component while the second component is about to be setup,
|
||||
it should not setup the second component twice.
|
||||
If the first component fires a discovery event to set up the
|
||||
second component while the second component is about to be set up,
|
||||
it should not set up the second component twice.
|
||||
"""
|
||||
component_calls = []
|
||||
|
||||
def component1_setup(hass, config):
|
||||
"""Setup mock component."""
|
||||
"""Set up mock component."""
|
||||
print('component1 setup')
|
||||
discovery.discover(hass, 'test_component2',
|
||||
component='test_component2')
|
||||
return True
|
||||
|
||||
def component2_setup(hass, config):
|
||||
"""Setup mock component."""
|
||||
"""Set up mock component."""
|
||||
component_calls.append(1)
|
||||
return True
|
||||
|
||||
@@ -186,7 +186,7 @@ class TestHelpersDiscovery:
|
||||
|
||||
@callback
|
||||
def do_setup():
|
||||
"""Setup 2 components."""
|
||||
"""Set up 2 components."""
|
||||
self.hass.async_add_job(setup.async_setup_component(
|
||||
self.hass, 'test_component1', {}))
|
||||
self.hass.async_add_job(setup.async_setup_component(
|
||||
|
||||
Reference in new issue
Block a user