Spelling fixes (#11940)
This commit is contained in:
1 parent
94316f07a2
commit
55ee8959ba
80 files changed
+110
-110
No files matched your search
@@ -83,7 +83,7 @@ class TestGetImage(object):
|
||||
@patch('homeassistant.components.camera.demo.DemoCamera.camera_image',
|
||||
autospec=True, return_value=b'Test')
|
||||
def test_get_image_from_camera(self, mock_camera):
|
||||
"""Grab a image from camera entity."""
|
||||
"""Grab an image from camera entity."""
|
||||
self.hass.start()
|
||||
|
||||
image = run_coroutine_threadsafe(camera.async_get_image(
|
||||
|
||||
@@ -139,12 +139,12 @@ class TestComponentsDeviceTrackerUnifiDirect(unittest.TestCase):
|
||||
devices = scanner._get_update() # pylint: disable=protected-access
|
||||
self.assertTrue(devices is None)
|
||||
|
||||
def test_good_reponse_parses(self):
|
||||
def test_good_response_parses(self):
|
||||
"""Test that the response form the AP parses to JSON correctly."""
|
||||
response = _response_to_json(load_fixture('unifi_direct.txt'))
|
||||
self.assertTrue(response != {})
|
||||
|
||||
def test_bad_reponse_returns_none(self):
|
||||
def test_bad_response_returns_none(self):
|
||||
"""Test that a bad response form the AP parses to JSON correctly."""
|
||||
self.assertTrue(_response_to_json("{(}") == {})
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ def test_query_climate_request_f(hass_fixture, assistant_client):
|
||||
|
||||
@asyncio.coroutine
|
||||
def test_execute_request(hass_fixture, assistant_client):
|
||||
"""Test a execute request."""
|
||||
"""Test an execute request."""
|
||||
reqid = '5711642932632160985'
|
||||
data = {
|
||||
'requestId':
|
||||
|
||||
@@ -82,7 +82,7 @@ class TestImageProcessing(object):
|
||||
@patch('homeassistant.components.camera.demo.DemoCamera.camera_image',
|
||||
autospec=True, return_value=b'Test')
|
||||
def test_get_image_from_camera(self, mock_camera):
|
||||
"""Grab a image from camera entity."""
|
||||
"""Grab an image from camera entity."""
|
||||
self.hass.start()
|
||||
|
||||
ip.scan(self.hass, entity_id='image_processing.test')
|
||||
|
||||
@@ -156,7 +156,7 @@ class TestLiteJetLight(unittest.TestCase):
|
||||
|
||||
# (Requesting the level is not strictly needed with a deactivated
|
||||
# event but the implementation happens to do it. This could be
|
||||
# changed to a assert_not_called in the future.)
|
||||
# changed to an assert_not_called in the future.)
|
||||
self.mock_lj.get_load_level.assert_called_with(
|
||||
ENTITY_OTHER_LIGHT_NUMBER)
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ class TestSonosMediaPlayer(unittest.TestCase):
|
||||
@mock.patch('socket.create_connection', side_effect=socket.error())
|
||||
@mock.patch('soco.discover')
|
||||
def test_ensure_setup_config_interface_addr(self, discover_mock, *args):
|
||||
"""Test a interface address config'd by the HASS config file."""
|
||||
"""Test an interface address config'd by the HASS config file."""
|
||||
discover_mock.return_value = {SoCoMock('192.0.2.1')}
|
||||
|
||||
config = {
|
||||
@@ -172,7 +172,7 @@ class TestSonosMediaPlayer(unittest.TestCase):
|
||||
@mock.patch('soco.discover')
|
||||
def test_ensure_setup_config_advertise_addr(self, discover_mock,
|
||||
*args):
|
||||
"""Test a advertise address config'd by the HASS config file."""
|
||||
"""Test an advertise address config'd by the HASS config file."""
|
||||
discover_mock.return_value = {SoCoMock('192.0.2.1')}
|
||||
|
||||
config = {
|
||||
|
||||
@@ -44,7 +44,7 @@ class TestYamahaMediaPlayer(unittest.TestCase):
|
||||
self.hass.stop()
|
||||
|
||||
def enable_output(self, port, enabled):
|
||||
"""Enable ouput on a specific port."""
|
||||
"""Enable output on a specific port."""
|
||||
data = {
|
||||
'entity_id': 'media_player.yamaha_receiver_main_zone',
|
||||
'port': port,
|
||||
|
||||
@@ -25,7 +25,7 @@ def create_engine_test(*args, **kwargs):
|
||||
|
||||
@asyncio.coroutine
|
||||
def test_schema_update_calls(hass):
|
||||
"""Test that schema migrations occurr in correct order."""
|
||||
"""Test that schema migrations occur in correct order."""
|
||||
with patch('sqlalchemy.create_engine', new=create_engine_test), \
|
||||
patch('homeassistant.components.recorder.migration._apply_update') as \
|
||||
update:
|
||||
|
||||
@@ -110,7 +110,7 @@ def test_derivative():
|
||||
yield from entity.async_update()
|
||||
|
||||
assert entity.state == STATE_UNKNOWN, \
|
||||
'state after first update shoudl still be unknown'
|
||||
'state after first update should still be unknown'
|
||||
|
||||
entity.telegram = {
|
||||
'1.0.0': MBusObject([
|
||||
|
||||
@@ -435,7 +435,7 @@ class TestDialogflow(unittest.TestCase):
|
||||
self.assertEqual("virgo", call.data.get("hello"))
|
||||
|
||||
def test_intent_with_no_action(self):
|
||||
"""Test a intent with no defined action."""
|
||||
"""Test an intent with no defined action."""
|
||||
data = {
|
||||
"id": REQUEST_ID,
|
||||
"timestamp": REQUEST_TIMESTAMP,
|
||||
@@ -480,7 +480,7 @@ class TestDialogflow(unittest.TestCase):
|
||||
"You have not defined an action in your Dialogflow intent.", text)
|
||||
|
||||
def test_intent_with_unknown_action(self):
|
||||
"""Test a intent with an action not defined in the conf."""
|
||||
"""Test an intent with an action not defined in the conf."""
|
||||
data = {
|
||||
"id": REQUEST_ID,
|
||||
"timestamp": REQUEST_TIMESTAMP,
|
||||
|
||||
@@ -224,7 +224,7 @@ class TestTTSYandexPlatform(object):
|
||||
|
||||
assert len(calls) == 0
|
||||
|
||||
def test_service_say_specifed_speaker(self, aioclient_mock):
|
||||
def test_service_say_specified_speaker(self, aioclient_mock):
|
||||
"""Test service call say."""
|
||||
calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA)
|
||||
|
||||
@@ -259,7 +259,7 @@ class TestTTSYandexPlatform(object):
|
||||
assert len(aioclient_mock.mock_calls) == 1
|
||||
assert len(calls) == 1
|
||||
|
||||
def test_service_say_specifed_emotion(self, aioclient_mock):
|
||||
def test_service_say_specified_emotion(self, aioclient_mock):
|
||||
"""Test service call say."""
|
||||
calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA)
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ class TestHelpersEntityComponent(unittest.TestCase):
|
||||
assert poll_ent.async_update.called
|
||||
|
||||
def test_polling_updates_entities_with_exception(self):
|
||||
"""Test the updated entities that not break with a exception."""
|
||||
"""Test the updated entities that not break with an exception."""
|
||||
component = EntityComponent(
|
||||
_LOGGER, DOMAIN, self.hass, timedelta(seconds=20))
|
||||
|
||||
@@ -663,7 +663,7 @@ def test_raise_error_on_update(hass):
|
||||
entity2 = EntityTest(name='test_2')
|
||||
|
||||
def _raise():
|
||||
"""Helper to raise a exception."""
|
||||
"""Helper to raise an exception."""
|
||||
raise AssertionError
|
||||
|
||||
entity1.update = _raise
|
||||
|
||||
@@ -17,7 +17,7 @@ VERSION_PATH = os.path.join(get_test_config_dir(), config_util.VERSION_FILE)
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# prevent .HA_VERISON file from being written
|
||||
# prevent .HA_VERSION file from being written
|
||||
@patch(
|
||||
'homeassistant.bootstrap.conf_util.process_ha_config_upgrade', Mock())
|
||||
@patch('homeassistant.util.location.detect_location_info',
|
||||
|
||||
+1
-1
@@ -172,7 +172,7 @@ class TestHomeAssistant(unittest.TestCase):
|
||||
assert len(call_count) == 2
|
||||
|
||||
def test_async_add_job_pending_tasks_executor(self):
|
||||
"""Run a executor in pending tasks."""
|
||||
"""Run an executor in pending tasks."""
|
||||
call_count = []
|
||||
|
||||
def test_executor():
|
||||
|
||||
@@ -28,7 +28,7 @@ def _url(path=''):
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
def setUpModule():
|
||||
"""Initalization of a Home Assistant server instance."""
|
||||
"""Initialization of a Home Assistant server instance."""
|
||||
global hass, master_api
|
||||
|
||||
hass = get_test_home_assistant()
|
||||
|
||||
@@ -48,7 +48,7 @@ class TestYaml(unittest.TestCase):
|
||||
load_yaml_config_file(YAML_CONFIG_FILE)
|
||||
|
||||
def test_no_key(self):
|
||||
"""Test item without an key."""
|
||||
"""Test item without a key."""
|
||||
files = {YAML_CONFIG_FILE: 'a: a\nnokeyhere'}
|
||||
with self.assertRaises(HomeAssistantError), \
|
||||
patch_yaml_files(files):
|
||||
|
||||
Reference in new issue
Block a user