Grammar and spelling fixes (#16065)

This commit is contained in:
Ville Skyttä authored and Fabian Affolter committed 2018-08-19 22:29:08 +02:00
1 parent 9e1fa7ef42
commit dbd0763f83
244 files changed
+453 -453

No files matched your search

@@ -116,7 +116,7 @@ WAKE_DEVICES_NO_IP = {
def setup_module():
"""Setup the test module."""
"""Set up the test module."""
global FAKEFILE
FAKEFILE = get_test_config_dir('fake_file')
with open(FAKEFILE, 'w') as out:
@@ -138,7 +138,7 @@ class TestComponentsDeviceTrackerASUSWRT(unittest.TestCase):
hass = None
def setup_method(self, _):
"""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()
mock_component(self.hass, 'zone')
@@ -500,7 +500,7 @@ class TestSshConnection(unittest.TestCase):
"""Testing SshConnection."""
def setUp(self):
"""Setup test env."""
"""Set up test env."""
self.connection = SshConnection(
'fake', 'fake', 'fake', 'fake', 'fake')
self.connection._connected = True
@@ -544,7 +544,7 @@ class TestTelnetConnection(unittest.TestCase):
"""Testing TelnetConnection."""
def setUp(self):
"""Setup test env."""
"""Set up test env."""
self.connection = TelnetConnection(
'fake', 'fake', 'fake', 'fake')
self.connection._connected = True
@@ -41,7 +41,7 @@ class TestDdwrt(unittest.TestCase):
super().run(result)
def setup_method(self, _):
"""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()
mock_component(self.hass, 'zone')
@@ -220,7 +220,7 @@ class TestDdwrt(unittest.TestCase):
with requests_mock.Mocker() as mock_request:
mock_request.register_uri(
'GET', r'http://%s/Status_Wireless.live.asp' % TEST_HOST,
# First request has to work to setup connection
# First request has to work to set up connection
[{'text': load_fixture('Ddwrt_Status_Wireless.txt')},
# Second request to get active devices fails
{'text': None}])
@@ -122,7 +122,7 @@ def geofency_client(loop, hass, aiohttp_client):
@pytest.fixture(autouse=True)
def setup_zones(loop, hass):
"""Setup Zone config in HA."""
"""Set up Zone config in HA."""
assert loop.run_until_complete(async_setup_component(
hass, zone.DOMAIN, {
'zone': {
+1 -1
View File
@@ -39,7 +39,7 @@ class TestComponentsDeviceTracker(unittest.TestCase):
# pylint: disable=invalid-name
def setUp(self):
"""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()
self.yaml_devices = self.hass.config.path(device_tracker.YAML_DEVICES)
+1 -1
View File
@@ -19,7 +19,7 @@ class TestComponentsDeviceTrackerMQTT(unittest.TestCase):
"""Test MQTT device tracker platform."""
def setUp(self): # pylint: disable=invalid-name
"""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()
mock_mqtt_component(self.hass)
@@ -29,7 +29,7 @@ class TestComponentsDeviceTrackerJSONMQTT(unittest.TestCase):
"""Test JSON MQTT device tracker platform."""
def setUp(self): # pylint: disable=invalid-name
"""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()
mock_mqtt_component(self.hass)
@@ -327,7 +327,7 @@ class TestDeviceTrackerOwnTracks(BaseMQTT):
# pylint: disable=invalid-name
def setup_method(self, _):
"""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()
mock_mqtt_component(self.hass)
mock_component(self.hass, 'group')
@@ -1316,7 +1316,7 @@ class TestDeviceTrackerOwnTrackConfigs(BaseMQTT):
# pylint: disable=invalid-name
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()
mock_mqtt_component(self.hass)
mock_component(self.hass, 'group')
@@ -16,7 +16,7 @@ class TestTplink4DeviceScanner(unittest.TestCase):
"""Tests for the Tplink4DeviceScanner class."""
def setUp(self): # pylint: disable=invalid-name
"""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(self): # pylint: disable=invalid-name
@@ -31,7 +31,7 @@ class TestComponentsDeviceTrackerUnifiDirect(unittest.TestCase):
'unifi_direct.UnifiDeviceScanner'
def setup_method(self, _):
"""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()
mock_component(self.hass, 'zone')
@@ -37,7 +37,7 @@ class TestUPCConnect:
"""Tests for the Ddwrt device tracker platform."""
def setup_method(self):
"""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()
mock_component(self.hass, 'zone')
mock_component(self.hass, 'group')
@@ -52,7 +52,7 @@ class TestUPCConnect:
'UPCDeviceScanner.async_scan_devices',
return_value=async_scan_devices_mock)
def test_setup_platform(self, scan_mock, aioclient_mock):
"""Setup a platform."""
"""Set up a platform."""
aioclient_mock.get(
"http://{}/common_page/login.html".format(self.host),
cookies={'sessionToken': '654321'}
@@ -74,7 +74,7 @@ class TestUPCConnect:
@patch('homeassistant.components.device_tracker._LOGGER.error')
def test_setup_platform_timeout_webservice(self, mock_error,
aioclient_mock):
"""Setup a platform with api timeout."""
"""Set up a platform with api timeout."""
aioclient_mock.get(
"http://{}/common_page/login.html".format(self.host),
cookies={'sessionToken': '654321'},
@@ -97,7 +97,7 @@ class TestUPCConnect:
@patch('homeassistant.components.device_tracker._LOGGER.error')
def test_setup_platform_timeout_loginpage(self, mock_error,
aioclient_mock):
"""Setup a platform with timeout on loginpage."""
"""Set up a platform with timeout on loginpage."""
aioclient_mock.get(
"http://{}/common_page/login.html".format(self.host),
exc=asyncio.TimeoutError()
@@ -120,7 +120,7 @@ class TestUPCConnect:
str(mock_error.call_args_list[-1])
def test_scan_devices(self, aioclient_mock):
"""Setup a upc platform and scan device."""
"""Set up a upc platform and scan device."""
aioclient_mock.get(
"http://{}/common_page/login.html".format(self.host),
cookies={'sessionToken': '654321'}
@@ -156,7 +156,7 @@ class TestUPCConnect:
'70:EE:50:27:A1:38']
def test_scan_devices_without_session(self, aioclient_mock):
"""Setup a upc platform and scan device with no token."""
"""Set up a upc platform and scan device with no token."""
aioclient_mock.get(
"http://{}/common_page/login.html".format(self.host),
cookies={'sessionToken': '654321'}
@@ -197,7 +197,7 @@ class TestUPCConnect:
'70:EE:50:27:A1:38']
def test_scan_devices_without_session_wrong_re(self, aioclient_mock):
"""Setup a upc platform and scan device with no token and wrong."""
"""Set up a upc platform and scan device with no token and wrong."""
aioclient_mock.get(
"http://{}/common_page/login.html".format(self.host),
cookies={'sessionToken': '654321'}
@@ -237,7 +237,7 @@ class TestUPCConnect:
assert mac_list == []
def test_scan_devices_parse_error(self, aioclient_mock):
"""Setup a upc platform and scan device with parse error."""
"""Set up a upc platform and scan device with parse error."""
aioclient_mock.get(
"http://{}/common_page/login.html".format(self.host),
cookies={'sessionToken': '654321'}