diff --git a/homeassistant/bootstrap.py b/homeassistant/bootstrap.py index 43c7168dd2e..5c85267ca44 100644 --- a/homeassistant/bootstrap.py +++ b/homeassistant/bootstrap.py @@ -307,7 +307,7 @@ def async_enable_logging(hass: core.HomeAssistant, hass.data[DATA_LOGGING] = err_log_path else: _LOGGER.error( - "Unable to setup error log %s (access denied)", err_log_path) + "Unable to set up error log %s (access denied)", err_log_path) async def async_mount_local_lib_path(config_dir: str) -> str: diff --git a/homeassistant/components/alarm_control_panel/__init__.py b/homeassistant/components/alarm_control_panel/__init__.py index f9f2a4e03be..63977ed88c7 100644 --- a/homeassistant/components/alarm_control_panel/__init__.py +++ b/homeassistant/components/alarm_control_panel/__init__.py @@ -141,7 +141,7 @@ def async_setup(hass, config): async def async_setup_entry(hass, entry): - """Setup a config entry.""" + """Set up a config entry.""" return await hass.data[DOMAIN].async_setup_entry(entry) diff --git a/homeassistant/components/alarm_control_panel/simplisafe.py b/homeassistant/components/alarm_control_panel/simplisafe.py index b400a927b5e..47b274875fc 100644 --- a/homeassistant/components/alarm_control_panel/simplisafe.py +++ b/homeassistant/components/alarm_control_panel/simplisafe.py @@ -45,7 +45,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): try: simplisafe = SimpliSafeApiInterface(username, password) except SimpliSafeAPIException: - _LOGGER.error("Failed to setup SimpliSafe") + _LOGGER.error("Failed to set up SimpliSafe") return systems = [] diff --git a/homeassistant/components/automation/__init__.py b/homeassistant/components/automation/__init__.py index 8b1cd3cad84..c6c0af90d15 100644 --- a/homeassistant/components/automation/__init__.py +++ b/homeassistant/components/automation/__init__.py @@ -1,5 +1,5 @@ """ -Allow to setup simple automation rules via the config file. +Allow to set up simple automation rules via the config file. For more details about this component, please refer to the documentation at https://home-assistant.io/components/automation/ diff --git a/homeassistant/components/binary_sensor/__init__.py b/homeassistant/components/binary_sensor/__init__.py index 26878044fe2..7b2da21ff6a 100644 --- a/homeassistant/components/binary_sensor/__init__.py +++ b/homeassistant/components/binary_sensor/__init__.py @@ -58,7 +58,7 @@ async def async_setup(hass, config): async def async_setup_entry(hass, entry): - """Setup a config entry.""" + """Set up a config entry.""" return await hass.data[DOMAIN].async_setup_entry(entry) diff --git a/homeassistant/components/binary_sensor/hikvision.py b/homeassistant/components/binary_sensor/hikvision.py index de6ad8223d7..78e8f9a973e 100644 --- a/homeassistant/components/binary_sensor/hikvision.py +++ b/homeassistant/components/binary_sensor/hikvision.py @@ -90,7 +90,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None): data = HikvisionData(hass, url, port, name, username, password) if data.sensors is None: - _LOGGER.error("Hikvision event stream has no data, unable to setup") + _LOGGER.error("Hikvision event stream has no data, unable to set up") return False entities = [] diff --git a/homeassistant/components/camera/__init__.py b/homeassistant/components/camera/__init__.py index 6a15510cf54..76860702165 100644 --- a/homeassistant/components/camera/__init__.py +++ b/homeassistant/components/camera/__init__.py @@ -145,7 +145,7 @@ async def async_get_image(hass, entity_id, timeout=10): component = hass.data.get(DOMAIN) if component is None: - raise HomeAssistantError('Camera component not setup') + raise HomeAssistantError('Camera component not set up') camera = component.get_entity(entity_id) @@ -214,7 +214,7 @@ async def async_setup(hass, config): async def async_setup_entry(hass, entry): - """Setup a config entry.""" + """Set up a config entry.""" return await hass.data[DOMAIN].async_setup_entry(entry) diff --git a/homeassistant/components/cast/.translations/en.json b/homeassistant/components/cast/.translations/en.json index 55d79a7d560..5222e4da3a1 100644 --- a/homeassistant/components/cast/.translations/en.json +++ b/homeassistant/components/cast/.translations/en.json @@ -6,10 +6,10 @@ }, "step": { "confirm": { - "description": "Do you want to setup Google Cast?", + "description": "Do you want to set up Google Cast?", "title": "Google Cast" } }, "title": "Google Cast" } -} \ No newline at end of file +} diff --git a/homeassistant/components/cast/strings.json b/homeassistant/components/cast/strings.json index 7f480de0e8b..eecdecbfdf9 100644 --- a/homeassistant/components/cast/strings.json +++ b/homeassistant/components/cast/strings.json @@ -4,7 +4,7 @@ "step": { "confirm": { "title": "Google Cast", - "description": "Do you want to setup Google Cast?" + "description": "Do you want to set up Google Cast?" } }, "abort": { diff --git a/homeassistant/components/climate/__init__.py b/homeassistant/components/climate/__init__.py index 90abe2343d2..f33f68b9423 100644 --- a/homeassistant/components/climate/__init__.py +++ b/homeassistant/components/climate/__init__.py @@ -294,7 +294,7 @@ async def async_setup(hass, config): async def async_setup_entry(hass, entry): - """Setup a config entry.""" + """Set up a config entry.""" return await hass.data[DOMAIN].async_setup_entry(entry) diff --git a/homeassistant/components/deconz/__init__.py b/homeassistant/components/deconz/__init__.py index eacfe22e818..a0b2b5a23cb 100644 --- a/homeassistant/components/deconz/__init__.py +++ b/homeassistant/components/deconz/__init__.py @@ -105,7 +105,7 @@ async def async_setup_entry(hass, config_entry): @callback def async_add_remote(sensors): - """Setup remote from deCONZ.""" + """Set up remote from deCONZ.""" from pydeconz.sensor import SWITCH as DECONZ_REMOTE allow_clip_sensor = config_entry.data.get(CONF_ALLOW_CLIP_SENSOR, True) for sensor in sensors: diff --git a/homeassistant/components/device_tracker/ritassist.py b/homeassistant/components/device_tracker/ritassist.py index f0973de39bd..c41ae9f2ec2 100644 --- a/homeassistant/components/device_tracker/ritassist.py +++ b/homeassistant/components/device_tracker/ritassist.py @@ -57,7 +57,7 @@ class RitAssistDeviceScanner: config.get(CONF_PASSWORD)) def setup(self, hass): - """Setup a timer and start gathering devices.""" + """Set up a timer and start gathering devices.""" self._refresh() track_utc_time_change(hass, lambda now: self._refresh(), diff --git a/homeassistant/components/homekit/__init__.py b/homeassistant/components/homekit/__init__.py index ad2f8b4ac6d..eac02855b0b 100644 --- a/homeassistant/components/homekit/__init__.py +++ b/homeassistant/components/homekit/__init__.py @@ -57,7 +57,7 @@ CONFIG_SCHEMA = vol.Schema({ async def async_setup(hass, config): - """Setup the HomeKit component.""" + """Set up the HomeKit component.""" _LOGGER.debug('Begin setup HomeKit') conf = config[DOMAIN] @@ -196,7 +196,7 @@ class HomeKit(): self.driver = None def setup(self): - """Setup bridge and accessory driver.""" + """Set up bridge and accessory driver.""" from .accessories import HomeBridge, HomeDriver self.hass.bus.async_listen_once( diff --git a/homeassistant/components/homekit/util.py b/homeassistant/components/homekit/util.py index 23a907d43f7..9d60530edd7 100644 --- a/homeassistant/components/homekit/util.py +++ b/homeassistant/components/homekit/util.py @@ -109,7 +109,7 @@ def show_setup_message(hass, pincode): """Display persistent notification with setup information.""" pin = pincode.decode() _LOGGER.info('Pincode: %s', pin) - message = 'To setup Home Assistant in the Home App, enter the ' \ + message = 'To set up Home Assistant in the Home App, enter the ' \ 'following code:\n### {}'.format(pin) hass.components.persistent_notification.create( message, 'HomeKit Setup', HOMEKIT_NOTIFY_ID) diff --git a/homeassistant/components/http/cors.py b/homeassistant/components/http/cors.py index 555f302f8e1..5698c6048e3 100644 --- a/homeassistant/components/http/cors.py +++ b/homeassistant/components/http/cors.py @@ -1,4 +1,4 @@ -"""Provide cors support for the HTTP component.""" +"""Provide CORS support for the HTTP component.""" from aiohttp.hdrs import ACCEPT, ORIGIN, CONTENT_TYPE @@ -17,7 +17,7 @@ ALLOWED_CORS_HEADERS = [ @callback def setup_cors(app, origins): - """Setup cors.""" + """Set up CORS.""" import aiohttp_cors cors = aiohttp_cors.setup(app, defaults={ @@ -30,7 +30,7 @@ def setup_cors(app, origins): cors_added = set() def _allow_cors(route, config=None): - """Allow cors on a route.""" + """Allow CORS on a route.""" if hasattr(route, 'resource'): path = route.resource else: @@ -55,7 +55,7 @@ def setup_cors(app, origins): return async def cors_startup(app): - """Initialize cors when app starts up.""" + """Initialize CORS when app starts up.""" for route in list(app.router.routes()): _allow_cors(route) diff --git a/homeassistant/components/ihc/__init__.py b/homeassistant/components/ihc/__init__.py index 672964f765e..9b00f3bd789 100644 --- a/homeassistant/components/ihc/__init__.py +++ b/homeassistant/components/ihc/__init__.py @@ -123,7 +123,7 @@ def setup(hass, config): def autosetup_ihc_products(hass: HomeAssistantType, config, ihc_controller): - """Auto setup of IHC products from the ihc project file.""" + """Auto setup of IHC products from the IHC project file.""" project_xml = ihc_controller.get_project() if not project_xml: _LOGGER.error("Unable to read project from ICH controller") @@ -177,7 +177,7 @@ def get_discovery_info(component_setup, groups): def setup_service_functions(hass: HomeAssistantType, ihc_controller): - """Setup the IHC service functions.""" + """Set up the IHC service functions.""" def set_runtime_value_bool(call): """Set a IHC runtime bool value service function.""" ihc_id = call.data[ATTR_IHC_ID] diff --git a/homeassistant/components/ihc/services.yaml b/homeassistant/components/ihc/services.yaml index 7b6053eff89..a0cc6774fdf 100644 --- a/homeassistant/components/ihc/services.yaml +++ b/homeassistant/components/ihc/services.yaml @@ -1,26 +1,26 @@ -# Describes the format for available ihc services +# Describes the format for available IHC services set_runtime_value_bool: - description: Set a boolean runtime value on the ihc controller + description: Set a boolean runtime value on the IHC controller fields: ihc_id: - description: The integer ihc resource id + description: The integer IHC resource id value: description: The boolean value to set set_runtime_value_int: - description: Set an integer runtime value on the ihc controller + description: Set an integer runtime value on the IHC controller fields: ihc_id: - description: The integer ihc resource id + description: The integer IHC resource id value: description: The integer value to set set_runtime_value_float: - description: Set a float runtime value on the ihc controller + description: Set a float runtime value on the IHC controller fields: ihc_id: - description: The integer ihc resource id + description: The integer IHC resource id value: description: The float value to set diff --git a/homeassistant/components/light/__init__.py b/homeassistant/components/light/__init__.py index 456ad6d69be..ddee4108e31 100644 --- a/homeassistant/components/light/__init__.py +++ b/homeassistant/components/light/__init__.py @@ -382,7 +382,7 @@ async def async_setup(hass, config): async def async_setup_entry(hass, entry): - """Setup a config entry.""" + """Set up a config entry.""" return await hass.data[DOMAIN].async_setup_entry(entry) diff --git a/homeassistant/components/light/ihc.py b/homeassistant/components/light/ihc.py index 5a7e85d50dc..aef50b12ad7 100644 --- a/homeassistant/components/light/ihc.py +++ b/homeassistant/components/light/ihc.py @@ -29,7 +29,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup the ihc lights platform.""" + """Set up the IHC lights platform.""" ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER] info = hass.data[IHC_DATA][IHC_INFO] devices = [] @@ -109,7 +109,7 @@ class IhcLight(IHCDevice, Light): self.ihc_controller.set_runtime_value_bool(self.ihc_id, False) def on_ihc_change(self, ihc_id, value): - """Callback from Ihc notifications.""" + """Callback from IHC notifications.""" if isinstance(value, bool): self._dimmable = False self._state = value != 0 diff --git a/homeassistant/components/light/lw12wifi.py b/homeassistant/components/light/lw12wifi.py index f81d8368f98..5b5a3b6f5c9 100644 --- a/homeassistant/components/light/lw12wifi.py +++ b/homeassistant/components/light/lw12wifi.py @@ -37,7 +37,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup LW-12 WiFi LED Controller platform.""" + """Set up LW-12 WiFi LED Controller platform.""" import lw12 # Assign configuration variables. diff --git a/homeassistant/components/lock/bmw_connected_drive.py b/homeassistant/components/lock/bmw_connected_drive.py index f4fb6d1fbf0..e48fd1af3c3 100644 --- a/homeassistant/components/lock/bmw_connected_drive.py +++ b/homeassistant/components/lock/bmw_connected_drive.py @@ -17,7 +17,7 @@ _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup the BMW Connected Drive lock.""" + """Set up the BMW Connected Drive lock.""" accounts = hass.data[BMW_DOMAIN] _LOGGER.debug('Found BMW accounts: %s', ', '.join([a.name for a in accounts])) diff --git a/homeassistant/components/media_player/__init__.py b/homeassistant/components/media_player/__init__.py index 31c254c0a39..7c49b095c66 100644 --- a/homeassistant/components/media_player/__init__.py +++ b/homeassistant/components/media_player/__init__.py @@ -461,7 +461,7 @@ async def async_setup(hass, config): async def async_setup_entry(hass, entry): - """Setup a config entry.""" + """Set up a config entry.""" return await hass.data[DOMAIN].async_setup_entry(entry) diff --git a/homeassistant/components/media_player/channels.py b/homeassistant/components/media_player/channels.py index 6ccc6061703..16c768796c5 100644 --- a/homeassistant/components/media_player/channels.py +++ b/homeassistant/components/media_player/channels.py @@ -56,7 +56,7 @@ REQUIREMENTS = ['pychannels==1.0.0'] def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup the Channels platform.""" + """Set up the Channels platform.""" device = ChannelsPlayer( config.get('name'), config.get(CONF_HOST), diff --git a/homeassistant/components/media_player/vizio.py b/homeassistant/components/media_player/vizio.py index 046aecbb92e..40ad0ef209c 100644 --- a/homeassistant/components/media_player/vizio.py +++ b/homeassistant/components/media_player/vizio.py @@ -62,7 +62,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): device = VizioDevice(host, token, name, volume_step) if device.validate_setup() is False: - _LOGGER.error("Failed to setup Vizio TV platform, " + _LOGGER.error("Failed to set up Vizio TV platform, " "please check if host and API key are correct") return diff --git a/homeassistant/components/mysensors/__init__.py b/homeassistant/components/mysensors/__init__.py index e498539f2f9..7ca9ea9f9ea 100644 --- a/homeassistant/components/mysensors/__init__.py +++ b/homeassistant/components/mysensors/__init__.py @@ -133,7 +133,7 @@ def setup_mysensors_platform( async_add_devices=None): """Set up a MySensors platform.""" # Only act if called via MySensors by discovery event. - # Otherwise gateway is not setup. + # Otherwise gateway is not set up. if not discovery_info: return if device_args is None: diff --git a/homeassistant/components/nest/__init__.py b/homeassistant/components/nest/__init__.py index d25b94bbc17..57111350396 100644 --- a/homeassistant/components/nest/__init__.py +++ b/homeassistant/components/nest/__init__.py @@ -119,7 +119,7 @@ async def async_setup(hass, config): async def async_setup_entry(hass, entry): - """Setup Nest from a config entry.""" + """Set up Nest from a config entry.""" from nest import Nest nest = Nest(access_token=entry.data['tokens']['access_token']) diff --git a/homeassistant/components/sabnzbd.py b/homeassistant/components/sabnzbd.py index b9c75c87c1d..f23831259a5 100644 --- a/homeassistant/components/sabnzbd.py +++ b/homeassistant/components/sabnzbd.py @@ -110,7 +110,7 @@ async def async_configure_sabnzbd(hass, config, use_ssl, name=DEFAULT_NAME, async def async_setup(hass, config): - """Setup the SABnzbd component.""" + """Set up the SABnzbd component.""" async def sabnzbd_discovered(service, info): """Handle service discovery.""" ssl = info.get('properties', {}).get('https', '0') == '1' @@ -129,7 +129,7 @@ async def async_setup(hass, config): @callback def async_setup_sabnzbd(hass, sab_api, config, name): - """Setup SABnzbd sensors and services.""" + """Set up SABnzbd sensors and services.""" sab_api_data = SabnzbdApiData(sab_api, name, config.get(CONF_SENSORS, {})) if config.get(CONF_SENSORS): diff --git a/homeassistant/components/scene/__init__.py b/homeassistant/components/scene/__init__.py index 7b76836555c..8771a84c1d6 100644 --- a/homeassistant/components/scene/__init__.py +++ b/homeassistant/components/scene/__init__.py @@ -95,7 +95,7 @@ async def async_setup(hass, config): async def async_setup_entry(hass, entry): - """Setup a config entry.""" + """Set up a config entry.""" return await hass.data[DOMAIN].async_setup_entry(entry) diff --git a/homeassistant/components/sensor/__init__.py b/homeassistant/components/sensor/__init__.py index 8550d175b63..948f844cfd4 100644 --- a/homeassistant/components/sensor/__init__.py +++ b/homeassistant/components/sensor/__init__.py @@ -43,7 +43,7 @@ async def async_setup(hass, config): async def async_setup_entry(hass, entry): - """Setup a config entry.""" + """Set up a config entry.""" return await hass.data[DOMAIN].async_setup_entry(entry) diff --git a/homeassistant/components/sensor/cert_expiry.py b/homeassistant/components/sensor/cert_expiry.py index 1ccaf2f6925..00139a30620 100644 --- a/homeassistant/components/sensor/cert_expiry.py +++ b/homeassistant/components/sensor/cert_expiry.py @@ -1,5 +1,5 @@ """ -Counter for the days till a HTTPS (TLS) certificate will expire. +Counter for the days until an HTTPS (TLS) certificate will expire. For more details about this sensor please refer to the documentation at https://home-assistant.io/components/sensor.cert_expiry/ diff --git a/homeassistant/components/sensor/duke_energy.py b/homeassistant/components/sensor/duke_energy.py index 458a2929d0b..17f118e3cb4 100644 --- a/homeassistant/components/sensor/duke_energy.py +++ b/homeassistant/components/sensor/duke_energy.py @@ -28,7 +28,7 @@ LAST_BILL_DAYS_BILLED = "last_bills_days_billed" def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup all Duke Energy meters.""" + """Set up all Duke Energy meters.""" from pydukeenergy.api import DukeEnergy, DukeEnergyException try: @@ -36,7 +36,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): config[CONF_PASSWORD], update_interval=120) except DukeEnergyException: - _LOGGER.error("Failed to setup Duke Energy") + _LOGGER.error("Failed to set up Duke Energy") return add_devices([DukeEnergyMeter(meter) for meter in duke.get_meters()]) diff --git a/homeassistant/components/sensor/fints.py b/homeassistant/components/sensor/fints.py index ef064e84228..b30bdd4a30c 100644 --- a/homeassistant/components/sensor/fints.py +++ b/homeassistant/components/sensor/fints.py @@ -151,7 +151,7 @@ class FinTsClient: class FinTsAccount(Entity): - """Sensor for a FinTS balanc account. + """Sensor for a FinTS balance account. A balance account contains an amount of money (=balance). The amount may also be negative. diff --git a/homeassistant/components/sensor/ihc.py b/homeassistant/components/sensor/ihc.py index 2dcf2c3f7be..7af034c4b93 100644 --- a/homeassistant/components/sensor/ihc.py +++ b/homeassistant/components/sensor/ihc.py @@ -31,7 +31,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup the ihc sensor platform.""" + """Set up the IHC sensor platform.""" ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER] info = hass.data[IHC_DATA][IHC_INFO] devices = [] @@ -77,6 +77,6 @@ class IHCSensor(IHCDevice, Entity): return self._unit_of_measurement def on_ihc_change(self, ihc_id, value): - """Callback when ihc resource changes.""" + """Callback when IHC resource changes.""" self._state = value self.schedule_update_ha_state() diff --git a/homeassistant/components/sensor/melissa.py b/homeassistant/components/sensor/melissa.py index f67722b0198..634ef4ad810 100644 --- a/homeassistant/components/sensor/melissa.py +++ b/homeassistant/components/sensor/melissa.py @@ -16,7 +16,7 @@ _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup the melissa sensor platform.""" + """Set up the melissa sensor platform.""" sensors = [] api = hass.data[DATA_MELISSA] devices = api.fetch_devices().values() diff --git a/homeassistant/components/sensor/nut.py b/homeassistant/components/sensor/nut.py index 7126bd89ef9..79ad176e42e 100644 --- a/homeassistant/components/sensor/nut.py +++ b/homeassistant/components/sensor/nut.py @@ -164,7 +164,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None): data = PyNUTData(host, port, alias, username, password) if data.status is None: - _LOGGER.error("NUT Sensor has no data, unable to setup") + _LOGGER.error("NUT Sensor has no data, unable to set up") raise PlatformNotReady _LOGGER.debug('NUT Sensors Available: %s', data.status) diff --git a/homeassistant/components/sensor/sht31.py b/homeassistant/components/sensor/sht31.py index 2aeff8e73d8..04b78c283c7 100644 --- a/homeassistant/components/sensor/sht31.py +++ b/homeassistant/components/sensor/sht31.py @@ -47,7 +47,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup the sensor platform.""" + """Set up the sensor platform.""" from Adafruit_SHT31 import SHT31 i2c_address = config.get(CONF_I2C_ADDRESS) diff --git a/homeassistant/components/sensor/sigfox.py b/homeassistant/components/sensor/sigfox.py index 408435a9667..191b3f54f35 100644 --- a/homeassistant/components/sensor/sigfox.py +++ b/homeassistant/components/sensor/sigfox.py @@ -77,7 +77,7 @@ class SigfoxAPI: _LOGGER.error( "Unable to login to Sigfox API, error code %s", str( response.status_code)) - raise ValueError('Sigfox component not setup') + raise ValueError('Sigfox component not set up') return True def get_device_types(self): diff --git a/homeassistant/components/sensor/uscis.py b/homeassistant/components/sensor/uscis.py index ed3c9ca8587..167f12f66c0 100644 --- a/homeassistant/components/sensor/uscis.py +++ b/homeassistant/components/sensor/uscis.py @@ -29,7 +29,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def setup_platform(hass, config, add_devices, discovery_info=None): - """Setting the platform in HASS and Case Information.""" + """Set up the platform in HASS and Case Information.""" uscis = UscisSensor(config['case_id'], config[CONF_FRIENDLY_NAME]) uscis.update() if uscis.valid_case_id: diff --git a/homeassistant/components/sensor/wirelesstag.py b/homeassistant/components/sensor/wirelesstag.py index ad2115e9bd3..8c3fae6e990 100644 --- a/homeassistant/components/sensor/wirelesstag.py +++ b/homeassistant/components/sensor/wirelesstag.py @@ -1,5 +1,5 @@ """ -Sensor support for Wirelss Sensor Tags platform. +Sensor support for Wireless Sensor Tags platform. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.wirelesstag/ @@ -58,7 +58,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup the sensor platform.""" + """Set up the sensor platform.""" platform = hass.data.get(WIRELESSTAG_DOMAIN) sensors = [] tags = platform.tags diff --git a/homeassistant/components/sonos/.translations/en.json b/homeassistant/components/sonos/.translations/en.json index c7aae4302f6..05c9d2fa780 100644 --- a/homeassistant/components/sonos/.translations/en.json +++ b/homeassistant/components/sonos/.translations/en.json @@ -6,10 +6,10 @@ }, "step": { "confirm": { - "description": "Do you want to setup Sonos?", + "description": "Do you want to set up Sonos?", "title": "Sonos" } }, "title": "Sonos" } -} \ No newline at end of file +} diff --git a/homeassistant/components/sonos/strings.json b/homeassistant/components/sonos/strings.json index 4aa68712d59..0422919c1aa 100644 --- a/homeassistant/components/sonos/strings.json +++ b/homeassistant/components/sonos/strings.json @@ -4,7 +4,7 @@ "step": { "confirm": { "title": "Sonos", - "description": "Do you want to setup Sonos?" + "description": "Do you want to set up Sonos?" } }, "abort": { diff --git a/homeassistant/components/switch/__init__.py b/homeassistant/components/switch/__init__.py index 3ca52a91758..c95c752435a 100644 --- a/homeassistant/components/switch/__init__.py +++ b/homeassistant/components/switch/__init__.py @@ -117,7 +117,7 @@ async def async_setup(hass, config): async def async_setup_entry(hass, entry): - """Setup a config entry.""" + """Set up a config entry.""" return await hass.data[DOMAIN].async_setup_entry(entry) diff --git a/homeassistant/components/switch/ihc.py b/homeassistant/components/switch/ihc.py index 3f461784693..c2fbeacef59 100644 --- a/homeassistant/components/switch/ihc.py +++ b/homeassistant/components/switch/ihc.py @@ -26,7 +26,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ def setup_platform(hass, config, add_devices, discovery_info=None): - """Setup the ihc switch platform.""" + """Set up the IHC switch platform.""" ihc_controller = hass.data[IHC_DATA][IHC_CONTROLLER] info = hass.data[IHC_DATA][IHC_INFO] devices = [] @@ -70,6 +70,6 @@ class IHCSwitch(IHCDevice, SwitchDevice): self.ihc_controller.set_runtime_value_bool(self.ihc_id, False) def on_ihc_change(self, ihc_id, value): - """Callback when the ihc resource changes.""" + """Callback when the IHC resource changes.""" self._state = value self.schedule_update_ha_state() diff --git a/homeassistant/components/waterfurnace.py b/homeassistant/components/waterfurnace.py index de49b5cd437..e9024131af8 100644 --- a/homeassistant/components/waterfurnace.py +++ b/homeassistant/components/waterfurnace.py @@ -43,7 +43,7 @@ CONFIG_SCHEMA = vol.Schema({ def setup(hass, base_config): - """Setup waterfurnace platform.""" + """Set up waterfurnace platform.""" import waterfurnace.waterfurnace as wf config = base_config.get(DOMAIN) diff --git a/homeassistant/components/wirelesstag.py b/homeassistant/components/wirelesstag.py index 0f8f47f5100..0afd976c9e3 100644 --- a/homeassistant/components/wirelesstag.py +++ b/homeassistant/components/wirelesstag.py @@ -87,7 +87,7 @@ class WirelessTagPlatform: 'content': content, 'disabled': False, 'nat': True}) def install_push_notifications(self, binary_sensors): - """Setup local push notification from tag manager.""" + """Set up local push notification from tag manager.""" _LOGGER.info("Registering local push notifications.") configs = [] diff --git a/homeassistant/components/zone/__init__.py b/homeassistant/components/zone/__init__.py index ee19e00266c..3754bf5edbc 100644 --- a/homeassistant/components/zone/__init__.py +++ b/homeassistant/components/zone/__init__.py @@ -44,7 +44,7 @@ PLATFORM_SCHEMA = vol.Schema({ async def async_setup(hass, config): - """Setup configured zones as well as home assistant zone if necessary.""" + """Set up configured zones as well as home assistant zone if necessary.""" hass.data[DOMAIN] = {} entities = set() zone_entries = configured_zones(hass) diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index be665d6b9e6..ad3ed896dd4 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -411,7 +411,7 @@ class ConfigEntries: async def _async_create_flow(self, handler_key, *, context, data): """Create a flow for specified handler. - Handler key is the domain of the component that we want to setup. + Handler key is the domain of the component that we want to set up. """ component = getattr(self.hass.components, handler_key) handler = HANDLERS.get(handler_key) diff --git a/homeassistant/helpers/discovery.py b/homeassistant/helpers/discovery.py index 7d0730a969c..698cee0fcc2 100644 --- a/homeassistant/helpers/discovery.py +++ b/homeassistant/helpers/discovery.py @@ -159,7 +159,7 @@ async def async_load_platform(hass, component, platform, discovered=None, setup_success = await setup.async_setup_component( hass, component, hass_config) - # No need to fire event if we could not setup component + # No need to fire event if we could not set up component if not setup_success: return diff --git a/homeassistant/helpers/entity_component.py b/homeassistant/helpers/entity_component.py index cf035095a84..1f99c90eb00 100644 --- a/homeassistant/helpers/entity_component.py +++ b/homeassistant/helpers/entity_component.py @@ -94,7 +94,7 @@ class EntityComponent: self.hass, self.domain, component_platform_discovered) async def async_setup_entry(self, config_entry): - """Setup a config entry.""" + """Set up a config entry.""" platform_type = config_entry.domain platform = await async_prepare_setup_platform( self.hass, self.config, self.domain, platform_type) diff --git a/homeassistant/helpers/entity_platform.py b/homeassistant/helpers/entity_platform.py index dc1e376f471..bda3db7ebd9 100644 --- a/homeassistant/helpers/entity_platform.py +++ b/homeassistant/helpers/entity_platform.py @@ -71,13 +71,13 @@ class EntityPlatform: self.parallel_updates = None async def async_setup(self, platform_config, discovery_info=None): - """Setup the platform from a config file.""" + """Set up the platform from a config file.""" platform = self.platform hass = self.hass @callback def async_create_setup_task(): - """Get task to setup platform.""" + """Get task to set up platform.""" if getattr(platform, 'async_setup_platform', None): return platform.async_setup_platform( hass, platform_config, @@ -93,21 +93,21 @@ class EntityPlatform: await self._async_setup_platform(async_create_setup_task) async def async_setup_entry(self, config_entry): - """Setup the platform from a config entry.""" + """Set up the platform from a config entry.""" # Store it so that we can save config entry ID in entity registry self.config_entry = config_entry platform = self.platform @callback def async_create_setup_task(): - """Get task to setup platform.""" + """Get task to set up platform.""" return platform.async_setup_entry( self.hass, config_entry, self._async_schedule_add_entities) return await self._async_setup_platform(async_create_setup_task) async def _async_setup_platform(self, async_create_setup_task, tries=0): - """Helper to setup a platform via config file or config entry. + """Helper to set up a platform via config file or config entry. async_create_setup_task creates a coroutine that sets up platform. """ diff --git a/homeassistant/setup.py b/homeassistant/setup.py index 31404b978eb..41201264da2 100644 --- a/homeassistant/setup.py +++ b/homeassistant/setup.py @@ -64,7 +64,7 @@ async def _async_process_dependencies( if dep in loader.DEPENDENCY_BLACKLIST] if blacklisted: - _LOGGER.error("Unable to setup dependencies of %s: " + _LOGGER.error("Unable to set up dependencies of %s: " "found blacklisted dependencies: %s", name, ', '.join(blacklisted)) return False @@ -81,7 +81,7 @@ async def _async_process_dependencies( in enumerate(results) if not res] if failed: - _LOGGER.error("Unable to setup dependencies of %s. " + _LOGGER.error("Unable to set up dependencies of %s. " "Setup failed for dependencies: %s", name, ', '.join(failed)) @@ -238,7 +238,7 @@ async def async_process_deps_reqs( hass, config, name, module.DEPENDENCIES) # type: ignore if not dep_success: - raise HomeAssistantError("Could not setup all dependencies.") + raise HomeAssistantError("Could not set up all dependencies.") if not hass.config.skip_pip and hasattr(module, 'REQUIREMENTS'): req_success = await requirements.async_process_requirements( diff --git a/tests/components/alarm_control_panel/test_manual.py b/tests/components/alarm_control_panel/test_manual.py index e4b29d43e48..02e528db914 100644 --- a/tests/components/alarm_control_panel/test_manual.py +++ b/tests/components/alarm_control_panel/test_manual.py @@ -22,7 +22,7 @@ class TestAlarmControlPanelManual(unittest.TestCase): """Test the manual alarm module.""" 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 diff --git a/tests/components/alarm_control_panel/test_manual_mqtt.py b/tests/components/alarm_control_panel/test_manual_mqtt.py index 719352c5419..5b601f089dd 100644 --- a/tests/components/alarm_control_panel/test_manual_mqtt.py +++ b/tests/components/alarm_control_panel/test_manual_mqtt.py @@ -21,7 +21,7 @@ class TestAlarmControlPanelManualMqtt(unittest.TestCase): """Test the manual_mqtt alarm module.""" 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() self.mock_publish = mock_mqtt_component(self.hass) diff --git a/tests/components/alarm_control_panel/test_mqtt.py b/tests/components/alarm_control_panel/test_mqtt.py index dee9b3959ca..ce152a3d7c9 100644 --- a/tests/components/alarm_control_panel/test_mqtt.py +++ b/tests/components/alarm_control_panel/test_mqtt.py @@ -21,7 +21,7 @@ class TestAlarmControlPanelMQTT(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.mock_publish = mock_mqtt_component(self.hass) diff --git a/tests/components/auth/__init__.py b/tests/components/auth/__init__.py index ce94d1ecbfa..e5eed4fca24 100644 --- a/tests/components/auth/__init__.py +++ b/tests/components/auth/__init__.py @@ -18,7 +18,7 @@ BASE_CONFIG = [{ async def async_setup_auth(hass, aiohttp_client, provider_configs=BASE_CONFIG, setup_api=False): - """Helper to setup authentication and create a HTTP client.""" + """Helper to set up authentication and create an HTTP client.""" hass.auth = await auth.auth_manager_from_config(hass, provider_configs) ensure_auth_manager_loaded(hass.auth) await async_setup_component(hass, 'auth', { diff --git a/tests/components/automation/test_event.py b/tests/components/automation/test_event.py index aea6e517e38..1b1ab440f5d 100644 --- a/tests/components/automation/test_event.py +++ b/tests/components/automation/test_event.py @@ -13,7 +13,7 @@ class TestAutomationEvent(unittest.TestCase): """Test the event automation.""" 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() mock_component(self.hass, 'group') self.calls = [] diff --git a/tests/components/automation/test_init.py b/tests/components/automation/test_init.py index b1990fb80aa..c3bd6c224af 100644 --- a/tests/components/automation/test_init.py +++ b/tests/components/automation/test_init.py @@ -22,7 +22,7 @@ class TestAutomation(unittest.TestCase): """Test the event automation.""" 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.calls = mock_service(self.hass, 'test', 'automation') diff --git a/tests/components/automation/test_litejet.py b/tests/components/automation/test_litejet.py index e6445415490..ca6f7796cfc 100644 --- a/tests/components/automation/test_litejet.py +++ b/tests/components/automation/test_litejet.py @@ -23,7 +23,7 @@ class TestLiteJetTrigger(unittest.TestCase): @mock.patch('pylitejet.LiteJet') def setup_method(self, method, mock_pylitejet): - """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.hass.start() diff --git a/tests/components/automation/test_mqtt.py b/tests/components/automation/test_mqtt.py index d1eb0d63ee8..f4669e803b6 100644 --- a/tests/components/automation/test_mqtt.py +++ b/tests/components/automation/test_mqtt.py @@ -14,7 +14,7 @@ class TestAutomationMQTT(unittest.TestCase): """Test the event automation.""" 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() mock_component(self.hass, 'group') mock_mqtt_component(self.hass) diff --git a/tests/components/automation/test_numeric_state.py b/tests/components/automation/test_numeric_state.py index de453675a57..0d73514f306 100644 --- a/tests/components/automation/test_numeric_state.py +++ b/tests/components/automation/test_numeric_state.py @@ -18,7 +18,7 @@ class TestAutomationNumericState(unittest.TestCase): """Test the event automation.""" 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() mock_component(self.hass, 'group') self.calls = [] diff --git a/tests/components/automation/test_state.py b/tests/components/automation/test_state.py index 22c84b88935..6b1a8914aad 100644 --- a/tests/components/automation/test_state.py +++ b/tests/components/automation/test_state.py @@ -19,7 +19,7 @@ class TestAutomationState(unittest.TestCase): """Test the event automation.""" 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() mock_component(self.hass, 'group') self.hass.states.set('test.entity', 'hello') diff --git a/tests/components/automation/test_sun.py b/tests/components/automation/test_sun.py index 355d088719f..4556b7cbe45 100644 --- a/tests/components/automation/test_sun.py +++ b/tests/components/automation/test_sun.py @@ -19,7 +19,7 @@ class TestAutomationSun(unittest.TestCase): """Test the sun automation.""" 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() mock_component(self.hass, 'group') setup_component(self.hass, sun.DOMAIN, { diff --git a/tests/components/automation/test_template.py b/tests/components/automation/test_template.py index 937fa16988a..5d75a273aea 100644 --- a/tests/components/automation/test_template.py +++ b/tests/components/automation/test_template.py @@ -14,7 +14,7 @@ class TestAutomationTemplate(unittest.TestCase): """Test the event automation.""" 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() mock_component(self.hass, 'group') self.hass.states.set('test.entity', 'hello') diff --git a/tests/components/automation/test_time.py b/tests/components/automation/test_time.py index 5d5d5ea29ec..251acfa3431 100644 --- a/tests/components/automation/test_time.py +++ b/tests/components/automation/test_time.py @@ -18,7 +18,7 @@ class TestAutomationTime(unittest.TestCase): """Test the event automation.""" 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() mock_component(self.hass, 'group') self.calls = [] diff --git a/tests/components/automation/test_zone.py b/tests/components/automation/test_zone.py index 3dc4b75b8ae..cca1c63e8c1 100644 --- a/tests/components/automation/test_zone.py +++ b/tests/components/automation/test_zone.py @@ -13,7 +13,7 @@ class TestAutomationZone(unittest.TestCase): """Test the event automation.""" 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() mock_component(self.hass, 'group') assert setup_component(self.hass, zone.DOMAIN, { diff --git a/tests/components/binary_sensor/test_command_line.py b/tests/components/binary_sensor/test_command_line.py index 07389c7c8a9..d469fc65e8e 100644 --- a/tests/components/binary_sensor/test_command_line.py +++ b/tests/components/binary_sensor/test_command_line.py @@ -12,7 +12,7 @@ class TestCommandSensorBinarySensor(unittest.TestCase): """Test the Command line Binary sensor.""" 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() def tearDown(self): diff --git a/tests/components/binary_sensor/test_ffmpeg.py b/tests/components/binary_sensor/test_ffmpeg.py index da9350008d8..4e6629c0afd 100644 --- a/tests/components/binary_sensor/test_ffmpeg.py +++ b/tests/components/binary_sensor/test_ffmpeg.py @@ -11,7 +11,7 @@ class TestFFmpegNoiseSetup: """Test class for ffmpeg.""" 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() self.config = { @@ -29,7 +29,7 @@ class TestFFmpegNoiseSetup: self.hass.stop() def test_setup_component(self): - """Setup ffmpeg component.""" + """Set up ffmpeg component.""" with assert_setup_component(1, 'binary_sensor'): setup_component(self.hass, 'binary_sensor', self.config) @@ -38,7 +38,7 @@ class TestFFmpegNoiseSetup: @patch('haffmpeg.SensorNoise.open_sensor', return_value=mock_coro()) def test_setup_component_start(self, mock_start): - """Setup ffmpeg component.""" + """Set up ffmpeg component.""" with assert_setup_component(1, 'binary_sensor'): setup_component(self.hass, 'binary_sensor', self.config) @@ -53,7 +53,7 @@ class TestFFmpegNoiseSetup: @patch('haffmpeg.SensorNoise') def test_setup_component_start_callback(self, mock_ffmpeg): - """Setup ffmpeg component.""" + """Set up ffmpeg component.""" with assert_setup_component(1, 'binary_sensor'): setup_component(self.hass, 'binary_sensor', self.config) @@ -76,7 +76,7 @@ class TestFFmpegMotionSetup: """Test class for ffmpeg.""" 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() self.config = { @@ -94,7 +94,7 @@ class TestFFmpegMotionSetup: self.hass.stop() def test_setup_component(self): - """Setup ffmpeg component.""" + """Set up ffmpeg component.""" with assert_setup_component(1, 'binary_sensor'): setup_component(self.hass, 'binary_sensor', self.config) @@ -103,7 +103,7 @@ class TestFFmpegMotionSetup: @patch('haffmpeg.SensorMotion.open_sensor', return_value=mock_coro()) def test_setup_component_start(self, mock_start): - """Setup ffmpeg component.""" + """Set up ffmpeg component.""" with assert_setup_component(1, 'binary_sensor'): setup_component(self.hass, 'binary_sensor', self.config) @@ -118,7 +118,7 @@ class TestFFmpegMotionSetup: @patch('haffmpeg.SensorMotion') def test_setup_component_start_callback(self, mock_ffmpeg): - """Setup ffmpeg component.""" + """Set up ffmpeg component.""" with assert_setup_component(1, 'binary_sensor'): setup_component(self.hass, 'binary_sensor', self.config) diff --git a/tests/components/binary_sensor/test_mqtt.py b/tests/components/binary_sensor/test_mqtt.py index 71eba2df950..57050c2cbf5 100644 --- a/tests/components/binary_sensor/test_mqtt.py +++ b/tests/components/binary_sensor/test_mqtt.py @@ -16,7 +16,7 @@ class TestSensorMQTT(unittest.TestCase): """Test the MQTT sensor.""" 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) diff --git a/tests/components/binary_sensor/test_nx584.py b/tests/components/binary_sensor/test_nx584.py index 4d1d85d30fb..117c32203eb 100644 --- a/tests/components/binary_sensor/test_nx584.py +++ b/tests/components/binary_sensor/test_nx584.py @@ -21,7 +21,7 @@ class TestNX584SensorSetup(unittest.TestCase): """Test the NX584 sensor platform.""" 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._mock_client = mock.patch.object(nx584_client, 'Client') self._mock_client.start() diff --git a/tests/components/binary_sensor/test_rest.py b/tests/components/binary_sensor/test_rest.py index d0670bf5154..d1c26624452 100644 --- a/tests/components/binary_sensor/test_rest.py +++ b/tests/components/binary_sensor/test_rest.py @@ -19,7 +19,7 @@ class TestRestBinarySensorSetup(unittest.TestCase): """Tests for setting up the REST binary sensor platform.""" 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() def tearDown(self): @@ -121,7 +121,7 @@ class TestRestBinarySensor(unittest.TestCase): """Tests for REST binary sensor platform.""" 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.rest = Mock('RestData') self.rest.update = Mock('RestData.update', diff --git a/tests/components/binary_sensor/test_tcp.py b/tests/components/binary_sensor/test_tcp.py index 8602de84d25..69673f09a46 100644 --- a/tests/components/binary_sensor/test_tcp.py +++ b/tests/components/binary_sensor/test_tcp.py @@ -13,7 +13,7 @@ class TestTCPBinarySensor(unittest.TestCase): """Test the TCP Binary Sensor.""" 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): diff --git a/tests/components/binary_sensor/test_template.py b/tests/components/binary_sensor/test_template.py index 62623a04f3c..eba3a368f56 100644 --- a/tests/components/binary_sensor/test_template.py +++ b/tests/components/binary_sensor/test_template.py @@ -23,7 +23,7 @@ class TestBinarySensorTemplate(unittest.TestCase): # 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() def teardown_method(self, method): diff --git a/tests/components/binary_sensor/test_workday.py b/tests/components/binary_sensor/test_workday.py index 893745ce3de..5aa5a5dad5c 100644 --- a/tests/components/binary_sensor/test_workday.py +++ b/tests/components/binary_sensor/test_workday.py @@ -16,7 +16,7 @@ class TestWorkdaySetup: """Test class for workday sensor.""" 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() # Set valid default config for test @@ -97,7 +97,7 @@ class TestWorkdaySetup: self.hass.stop() def test_setup_component_province(self): - """Setup workday component.""" + """Set up workday component.""" with assert_setup_component(1, 'binary_sensor'): setup_component(self.hass, 'binary_sensor', self.config_province) @@ -145,7 +145,7 @@ class TestWorkdaySetup: assert entity.state == 'off' def test_setup_component_noprovince(self): - """Setup workday component.""" + """Set up workday component.""" with assert_setup_component(1, 'binary_sensor'): setup_component(self.hass, 'binary_sensor', self.config_noprovince) @@ -191,7 +191,7 @@ class TestWorkdaySetup: assert entity.state == 'on' def test_setup_component_invalidprovince(self): - """Setup workday component.""" + """Set up workday component.""" with assert_setup_component(1, 'binary_sensor'): setup_component(self.hass, 'binary_sensor', self.config_invalidprovince) diff --git a/tests/components/calendar/test_google.py b/tests/components/calendar/test_google.py index d176cd758b4..e07f7a6306a 100644 --- a/tests/components/calendar/test_google.py +++ b/tests/components/calendar/test_google.py @@ -25,7 +25,7 @@ class TestComponentsGoogleCalendar(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.hass.http = Mock() diff --git a/tests/components/camera/test_init.py b/tests/components/camera/test_init.py index cf902ca1779..053fa6d29dc 100644 --- a/tests/components/camera/test_init.py +++ b/tests/components/camera/test_init.py @@ -34,7 +34,7 @@ class TestSetupCamera: """Test class for setup camera.""" 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() def teardown_method(self): @@ -42,7 +42,7 @@ class TestSetupCamera: self.hass.stop() def test_setup_component(self): - """Setup demo platform on camera component.""" + """Set up demo platform on camera component.""" config = { camera.DOMAIN: { 'platform': 'demo' @@ -57,7 +57,7 @@ class TestGetImage: """Test class for camera.""" 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() setup_component( diff --git a/tests/components/camera/test_uvc.py b/tests/components/camera/test_uvc.py index 18292d32a02..328ba5096ea 100644 --- a/tests/components/camera/test_uvc.py +++ b/tests/components/camera/test_uvc.py @@ -17,7 +17,7 @@ class TestUVCSetup(unittest.TestCase): """Test the UVC camera platform.""" 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() def tearDown(self): @@ -134,7 +134,7 @@ class TestUVCSetup(unittest.TestCase): @mock.patch.object(uvc, 'UnifiVideoCamera') @mock.patch('uvcclient.nvr.UVCRemote') def setup_nvr_errors_during_indexing(self, error, mock_remote, mock_uvc): - """Setup test for NVR errors during indexing.""" + """Set up test for NVR errors during indexing.""" config = { 'platform': 'uvc', 'nvr': 'foo', @@ -163,7 +163,7 @@ class TestUVCSetup(unittest.TestCase): @mock.patch('uvcclient.nvr.UVCRemote.__init__') def setup_nvr_errors_during_initialization(self, error, mock_remote, mock_uvc): - """Setup test for NVR errors during initialization.""" + """Set up test for NVR errors during initialization.""" config = { 'platform': 'uvc', 'nvr': 'foo', @@ -195,7 +195,7 @@ class TestUVC(unittest.TestCase): """Test class for UVC.""" def setup_method(self, method): - """Setup the mock camera.""" + """Set up the mock camera.""" self.nvr = mock.MagicMock() self.uuid = 'uuid' self.name = 'name' diff --git a/tests/components/climate/test_demo.py b/tests/components/climate/test_demo.py index b2633a75583..0cd6d288536 100644 --- a/tests/components/climate/test_demo.py +++ b/tests/components/climate/test_demo.py @@ -19,7 +19,7 @@ class TestDemoClimate(unittest.TestCase): """Test the demo climate hvac.""" 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() self.hass.config.units = METRIC_SYSTEM self.assertTrue(setup_component(self.hass, climate.DOMAIN, { diff --git a/tests/components/climate/test_generic_thermostat.py b/tests/components/climate/test_generic_thermostat.py index 7bc0b0a18e7..59ddb004bec 100644 --- a/tests/components/climate/test_generic_thermostat.py +++ b/tests/components/climate/test_generic_thermostat.py @@ -42,7 +42,7 @@ class TestSetupClimateGenericThermostat(unittest.TestCase): """Test the Generic thermostat with custom config.""" 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 @@ -79,7 +79,7 @@ class TestGenericThermostatHeaterSwitching(unittest.TestCase): """ 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() self.hass.config.units = METRIC_SYSTEM self.assertTrue(run_coroutine_threadsafe( @@ -142,7 +142,7 @@ class TestGenericThermostatHeaterSwitching(unittest.TestCase): self.hass.states.get(heater_switch).state) def _setup_sensor(self, temp, unit=TEMP_CELSIUS): - """Setup the test sensor.""" + """Set up the test sensor.""" self.hass.states.set(ENT_SENSOR, temp, { ATTR_UNIT_OF_MEASUREMENT: unit }) @@ -152,7 +152,7 @@ class TestClimateGenericThermostat(unittest.TestCase): """Test the Generic thermostat.""" 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() self.hass.config.units = METRIC_SYSTEM assert setup_component(self.hass, climate.DOMAIN, {'climate': { @@ -368,13 +368,13 @@ class TestClimateGenericThermostat(unittest.TestCase): self.assertEqual(ENT_SWITCH, call.data['entity_id']) def _setup_sensor(self, temp, unit=TEMP_CELSIUS): - """Setup the test sensor.""" + """Set up the test sensor.""" self.hass.states.set(ENT_SENSOR, temp, { ATTR_UNIT_OF_MEASUREMENT: unit }) def _setup_switch(self, is_on): - """Setup the test switch.""" + """Set up the test switch.""" self.hass.states.set(ENT_SWITCH, STATE_ON if is_on else STATE_OFF) self.calls = [] @@ -391,7 +391,7 @@ class TestClimateGenericThermostatACMode(unittest.TestCase): """Test the Generic thermostat.""" 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() self.hass.config.temperature_unit = TEMP_CELSIUS assert setup_component(self.hass, climate.DOMAIN, {'climate': { @@ -533,13 +533,13 @@ class TestClimateGenericThermostatACMode(unittest.TestCase): self.assertEqual(0, len(self.calls)) def _setup_sensor(self, temp, unit=TEMP_CELSIUS): - """Setup the test sensor.""" + """Set up the test sensor.""" self.hass.states.set(ENT_SENSOR, temp, { ATTR_UNIT_OF_MEASUREMENT: unit }) def _setup_switch(self, is_on): - """Setup the test switch.""" + """Set up the test switch.""" self.hass.states.set(ENT_SWITCH, STATE_ON if is_on else STATE_OFF) self.calls = [] @@ -556,7 +556,7 @@ class TestClimateGenericThermostatACModeMinCycle(unittest.TestCase): """Test the Generic Thermostat.""" 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() self.hass.config.temperature_unit = TEMP_CELSIUS assert setup_component(self.hass, climate.DOMAIN, {'climate': { @@ -627,13 +627,13 @@ class TestClimateGenericThermostatACModeMinCycle(unittest.TestCase): self.assertEqual(ENT_SWITCH, call.data['entity_id']) def _setup_sensor(self, temp, unit=TEMP_CELSIUS): - """Setup the test sensor.""" + """Set up the test sensor.""" self.hass.states.set(ENT_SENSOR, temp, { ATTR_UNIT_OF_MEASUREMENT: unit }) def _setup_switch(self, is_on): - """Setup the test switch.""" + """Set up the test switch.""" self.hass.states.set(ENT_SWITCH, STATE_ON if is_on else STATE_OFF) self.calls = [] @@ -650,7 +650,7 @@ class TestClimateGenericThermostatMinCycle(unittest.TestCase): """Test the Generic thermostat.""" 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() self.hass.config.temperature_unit = TEMP_CELSIUS assert setup_component(self.hass, climate.DOMAIN, {'climate': { @@ -720,13 +720,13 @@ class TestClimateGenericThermostatMinCycle(unittest.TestCase): self.assertEqual(ENT_SWITCH, call.data['entity_id']) def _setup_sensor(self, temp, unit=TEMP_CELSIUS): - """Setup the test sensor.""" + """Set up the test sensor.""" self.hass.states.set(ENT_SENSOR, temp, { ATTR_UNIT_OF_MEASUREMENT: unit }) def _setup_switch(self, is_on): - """Setup the test switch.""" + """Set up the test switch.""" self.hass.states.set(ENT_SWITCH, STATE_ON if is_on else STATE_OFF) self.calls = [] @@ -743,7 +743,7 @@ class TestClimateGenericThermostatACKeepAlive(unittest.TestCase): """Test the Generic Thermostat.""" 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() self.hass.config.temperature_unit = TEMP_CELSIUS assert setup_component(self.hass, climate.DOMAIN, {'climate': { @@ -813,13 +813,13 @@ class TestClimateGenericThermostatACKeepAlive(unittest.TestCase): self.hass.bus.fire(ha.EVENT_TIME_CHANGED, {ha.ATTR_NOW: now}) def _setup_sensor(self, temp, unit=TEMP_CELSIUS): - """Setup the test sensor.""" + """Set up the test sensor.""" self.hass.states.set(ENT_SENSOR, temp, { ATTR_UNIT_OF_MEASUREMENT: unit }) def _setup_switch(self, is_on): - """Setup the test switch.""" + """Set up the test switch.""" self.hass.states.set(ENT_SWITCH, STATE_ON if is_on else STATE_OFF) self.calls = [] @@ -836,7 +836,7 @@ class TestClimateGenericThermostatKeepAlive(unittest.TestCase): """Test the Generic Thermostat.""" 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() self.hass.config.temperature_unit = TEMP_CELSIUS assert setup_component(self.hass, climate.DOMAIN, {'climate': { @@ -905,13 +905,13 @@ class TestClimateGenericThermostatKeepAlive(unittest.TestCase): self.hass.bus.fire(ha.EVENT_TIME_CHANGED, {ha.ATTR_NOW: now}) def _setup_sensor(self, temp, unit=TEMP_CELSIUS): - """Setup the test sensor.""" + """Set up the test sensor.""" self.hass.states.set(ENT_SENSOR, temp, { ATTR_UNIT_OF_MEASUREMENT: unit }) def _setup_switch(self, is_on): - """Setup the test switch.""" + """Set up the test switch.""" self.hass.states.set(ENT_SWITCH, STATE_ON if is_on else STATE_OFF) self.calls = [] @@ -999,7 +999,7 @@ class TestClimateGenericThermostatRestoreState(unittest.TestCase): """Test generic thermostat when restore state from HA startup.""" 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() self.hass.config.temperature_unit = TEMP_CELSIUS @@ -1048,13 +1048,13 @@ class TestClimateGenericThermostatRestoreState(unittest.TestCase): }}) def _setup_sensor(self, temp, unit=TEMP_CELSIUS): - """Setup the test sensor.""" + """Set up the test sensor.""" self.hass.states.set(ENT_SENSOR, temp, { ATTR_UNIT_OF_MEASUREMENT: unit }) def _setup_switch(self, is_on): - """Setup the test switch.""" + """Set up the test switch.""" self.hass.states.set(ENT_SWITCH, STATE_ON if is_on else STATE_OFF) self.calls = [] diff --git a/tests/components/climate/test_mqtt.py b/tests/components/climate/test_mqtt.py index 5db77331cd4..f46a23e4f97 100644 --- a/tests/components/climate/test_mqtt.py +++ b/tests/components/climate/test_mqtt.py @@ -35,7 +35,7 @@ class TestMQTTClimate(unittest.TestCase): """Test the mqtt climate hvac.""" 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() self.mock_publish = mock_mqtt_component(self.hass) self.hass.config.units = METRIC_SYSTEM diff --git a/tests/components/cover/test_command_line.py b/tests/components/cover/test_command_line.py index b7049d35021..346c3f94683 100644 --- a/tests/components/cover/test_command_line.py +++ b/tests/components/cover/test_command_line.py @@ -17,7 +17,7 @@ class TestCommandCover(unittest.TestCase): """Test the cover command line platform.""" 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() self.rs = cmd_rs.CommandCover(self.hass, 'foo', 'command_open', 'command_close', diff --git a/tests/components/cover/test_demo.py b/tests/components/cover/test_demo.py index 9d26a6a4f4a..65aa9a9b9ef 100644 --- a/tests/components/cover/test_demo.py +++ b/tests/components/cover/test_demo.py @@ -14,7 +14,7 @@ class TestCoverDemo(unittest.TestCase): """Test the Demo cover.""" 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() self.assertTrue(setup_component(self.hass, cover.DOMAIN, {'cover': { 'platform': 'demo', diff --git a/tests/components/cover/test_group.py b/tests/components/cover/test_group.py index 288e1c5e047..028845983a0 100644 --- a/tests/components/cover/test_group.py +++ b/tests/components/cover/test_group.py @@ -35,7 +35,7 @@ class TestMultiCover(unittest.TestCase): """Test the group cover platform.""" 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() def tearDown(self): diff --git a/tests/components/cover/test_mqtt.py b/tests/components/cover/test_mqtt.py index aea6398e3ae..ad68c2416ca 100644 --- a/tests/components/cover/test_mqtt.py +++ b/tests/components/cover/test_mqtt.py @@ -15,7 +15,7 @@ class TestCoverMQTT(unittest.TestCase): """Test the MQTT cover.""" 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() self.mock_publish = mock_mqtt_component(self.hass) diff --git a/tests/components/cover/test_rfxtrx.py b/tests/components/cover/test_rfxtrx.py index be2c456296b..ab8b8f9a93c 100644 --- a/tests/components/cover/test_rfxtrx.py +++ b/tests/components/cover/test_rfxtrx.py @@ -14,7 +14,7 @@ class TestCoverRfxtrx(unittest.TestCase): """Test the Rfxtrx cover platform.""" 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() mock_component('rfxtrx') diff --git a/tests/components/device_tracker/test_asuswrt.py b/tests/components/device_tracker/test_asuswrt.py index 956b407eeaa..8c5af618288 100644 --- a/tests/components/device_tracker/test_asuswrt.py +++ b/tests/components/device_tracker/test_asuswrt.py @@ -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 diff --git a/tests/components/device_tracker/test_ddwrt.py b/tests/components/device_tracker/test_ddwrt.py index 416b7be4a8a..3e60e1bae46 100644 --- a/tests/components/device_tracker/test_ddwrt.py +++ b/tests/components/device_tracker/test_ddwrt.py @@ -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}]) diff --git a/tests/components/device_tracker/test_geofency.py b/tests/components/device_tracker/test_geofency.py index a955dd0cc11..d84940d9fbf 100644 --- a/tests/components/device_tracker/test_geofency.py +++ b/tests/components/device_tracker/test_geofency.py @@ -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': { diff --git a/tests/components/device_tracker/test_init.py b/tests/components/device_tracker/test_init.py index 0b17b4e0ac8..e9e4650e41a 100644 --- a/tests/components/device_tracker/test_init.py +++ b/tests/components/device_tracker/test_init.py @@ -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) diff --git a/tests/components/device_tracker/test_mqtt.py b/tests/components/device_tracker/test_mqtt.py index de7865517a8..8e4d0dc2769 100644 --- a/tests/components/device_tracker/test_mqtt.py +++ b/tests/components/device_tracker/test_mqtt.py @@ -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) diff --git a/tests/components/device_tracker/test_mqtt_json.py b/tests/components/device_tracker/test_mqtt_json.py index 8ab6346f19b..41c1d9c0885 100644 --- a/tests/components/device_tracker/test_mqtt_json.py +++ b/tests/components/device_tracker/test_mqtt_json.py @@ -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) diff --git a/tests/components/device_tracker/test_owntracks.py b/tests/components/device_tracker/test_owntracks.py index 37a3e570b53..8883ea22600 100644 --- a/tests/components/device_tracker/test_owntracks.py +++ b/tests/components/device_tracker/test_owntracks.py @@ -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') diff --git a/tests/components/device_tracker/test_tplink.py b/tests/components/device_tracker/test_tplink.py index 88e38108133..b9f1f5f5e5a 100644 --- a/tests/components/device_tracker/test_tplink.py +++ b/tests/components/device_tracker/test_tplink.py @@ -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 diff --git a/tests/components/device_tracker/test_unifi_direct.py b/tests/components/device_tracker/test_unifi_direct.py index d1ede721142..1f9cbd24f12 100644 --- a/tests/components/device_tracker/test_unifi_direct.py +++ b/tests/components/device_tracker/test_unifi_direct.py @@ -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') diff --git a/tests/components/device_tracker/test_upc_connect.py b/tests/components/device_tracker/test_upc_connect.py index 6294ba3467a..6b38edc3ce9 100644 --- a/tests/components/device_tracker/test_upc_connect.py +++ b/tests/components/device_tracker/test_upc_connect.py @@ -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'} diff --git a/tests/components/emulated_hue/test_hue_api.py b/tests/components/emulated_hue/test_hue_api.py index c99d273a458..3920a45ddf6 100644 --- a/tests/components/emulated_hue/test_hue_api.py +++ b/tests/components/emulated_hue/test_hue_api.py @@ -26,7 +26,7 @@ JSON_HEADERS = {CONTENT_TYPE: const.CONTENT_TYPE_JSON} @pytest.fixture def hass_hue(loop, hass): - """Setup a Home Assistant instance for these tests.""" + """Set up a Home Assistant instance for these tests.""" # We need to do this to get access to homeassistant/turn_(on,off) loop.run_until_complete( core_components.async_setup(hass, {core.DOMAIN: {}})) diff --git a/tests/components/emulated_hue/test_upnp.py b/tests/components/emulated_hue/test_upnp.py index 8315de34e06..f5377b1812c 100644 --- a/tests/components/emulated_hue/test_upnp.py +++ b/tests/components/emulated_hue/test_upnp.py @@ -50,7 +50,7 @@ class TestEmulatedHue(unittest.TestCase): @classmethod def setUpClass(cls): - """Setup the class.""" + """Set up the class.""" cls.hass = hass = get_test_home_assistant() # We need to do this to get access to homeassistant/turn_(on,off) diff --git a/tests/components/fan/test_dyson.py b/tests/components/fan/test_dyson.py index 2953ea2754b..a935210784b 100644 --- a/tests/components/fan/test_dyson.py +++ b/tests/components/fan/test_dyson.py @@ -68,7 +68,7 @@ class DysonTest(unittest.TestCase): """Dyson Sensor component test 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 diff --git a/tests/components/fan/test_mqtt.py b/tests/components/fan/test_mqtt.py index 9060d7b9986..7f69e56218b 100644 --- a/tests/components/fan/test_mqtt.py +++ b/tests/components/fan/test_mqtt.py @@ -13,7 +13,7 @@ class TestMqttFan(unittest.TestCase): """Test the MQTT fan 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() self.mock_publish = mock_mqtt_component(self.hass) diff --git a/tests/components/fan/test_template.py b/tests/components/fan/test_template.py index 53eb9e8e2d4..e229083069d 100644 --- a/tests/components/fan/test_template.py +++ b/tests/components/fan/test_template.py @@ -33,7 +33,7 @@ class TestTemplateFan: # pylint: disable=invalid-name def setup_method(self, method): - """Setup.""" + """Set up.""" self.hass = get_test_home_assistant() self.calls = [] diff --git a/tests/components/group/test_init.py b/tests/components/group/test_init.py index a5e9bbc0b82..47101dd415a 100644 --- a/tests/components/group/test_init.py +++ b/tests/components/group/test_init.py @@ -19,7 +19,7 @@ class TestComponentsGroup(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() # pylint: disable=invalid-name @@ -28,7 +28,7 @@ class TestComponentsGroup(unittest.TestCase): self.hass.stop() def test_setup_group_with_mixed_groupable_states(self): - """Try to setup a group with mixed groupable states.""" + """Try to set up a group with mixed groupable states.""" self.hass.states.set('light.Bowl', STATE_ON) self.hass.states.set('device_tracker.Paulus', STATE_HOME) group.Group.create_group( @@ -41,7 +41,7 @@ class TestComponentsGroup(unittest.TestCase): group.ENTITY_ID_FORMAT.format('person_and_light')).state) def test_setup_group_with_a_non_existing_state(self): - """Try to setup a group with a non existing state.""" + """Try to set up a group with a non existing state.""" self.hass.states.set('light.Bowl', STATE_ON) grp = group.Group.create_group( @@ -62,7 +62,7 @@ class TestComponentsGroup(unittest.TestCase): self.assertEqual(STATE_UNKNOWN, grp.state) def test_setup_empty_group(self): - """Try to setup an empty group.""" + """Try to set up an empty group.""" grp = group.Group.create_group(self.hass, 'nothing', []) self.assertEqual(STATE_UNKNOWN, grp.state) diff --git a/tests/components/http/test_auth.py b/tests/components/http/test_auth.py index 8e7a62e2e9f..e96531c0961 100644 --- a/tests/components/http/test_auth.py +++ b/tests/components/http/test_auth.py @@ -38,7 +38,7 @@ async def mock_handler(request): @pytest.fixture def app(hass): - """Fixture to setup a web.Application.""" + """Fixture to set up a web.Application.""" app = web.Application() app['hass'] = hass app.router.add_get('/', mock_handler) @@ -48,7 +48,7 @@ def app(hass): @pytest.fixture def app2(hass): - """Fixture to setup a web.Application without real_ip middleware.""" + """Fixture to set up a web.Application without real_ip middleware.""" app = web.Application() app['hass'] = hass app.router.add_get('/', mock_handler) diff --git a/tests/components/http/test_cors.py b/tests/components/http/test_cors.py index a510d2b3829..c95146d5cca 100644 --- a/tests/components/http/test_cors.py +++ b/tests/components/http/test_cors.py @@ -49,7 +49,7 @@ async def mock_handler(request): @pytest.fixture def client(loop, aiohttp_client): - """Fixture to setup a web.Application.""" + """Fixture to set up a web.Application.""" app = web.Application() app.router.add_get('/', mock_handler) setup_cors(app, [TRUSTED_ORIGIN]) diff --git a/tests/components/hue/test_init.py b/tests/components/hue/test_init.py index ea656ba8fc6..d12270cd908 100644 --- a/tests/components/hue/test_init.py +++ b/tests/components/hue/test_init.py @@ -8,7 +8,7 @@ from tests.common import mock_coro, MockConfigEntry async def test_setup_with_no_config(hass): - """Test that we do not discover anything or try to setup a bridge.""" + """Test that we do not discover anything or try to set up a bridge.""" with patch.object(hass, 'config_entries') as mock_config_entries, \ patch.object(hue, 'configured_hosts', return_value=[]): assert await async_setup_component(hass, hue.DOMAIN, {}) is True diff --git a/tests/components/image_processing/test_facebox.py b/tests/components/image_processing/test_facebox.py index b1d9fb8bf79..62e47a07c08 100644 --- a/tests/components/image_processing/test_facebox.py +++ b/tests/components/image_processing/test_facebox.py @@ -141,13 +141,13 @@ def test_valid_file_path(): async def test_setup_platform(hass, mock_healthybox): - """Setup platform with one entity.""" + """Set up platform with one entity.""" await async_setup_component(hass, ip.DOMAIN, VALID_CONFIG) assert hass.states.get(VALID_ENTITY_ID) async def test_setup_platform_with_auth(hass, mock_healthybox): - """Setup platform with one entity and auth.""" + """Set up platform with one entity and auth.""" valid_config_auth = VALID_CONFIG.copy() valid_config_auth[ip.DOMAIN][CONF_USERNAME] = MOCK_USERNAME valid_config_auth[ip.DOMAIN][CONF_PASSWORD] = MOCK_PASSWORD @@ -297,7 +297,7 @@ async def test_teach_service( async def test_setup_platform_with_name(hass, mock_healthybox): - """Setup platform with one entity and a name.""" + """Set up platform with one entity and a name.""" named_entity_id = 'image_processing.{}'.format(MOCK_NAME) valid_config_named = VALID_CONFIG.copy() diff --git a/tests/components/image_processing/test_init.py b/tests/components/image_processing/test_init.py index ab2e3be11d6..4240e173b26 100644 --- a/tests/components/image_processing/test_init.py +++ b/tests/components/image_processing/test_init.py @@ -16,7 +16,7 @@ class TestSetupImageProcessing: """Test class for setup image processing.""" 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() def teardown_method(self): @@ -24,7 +24,7 @@ class TestSetupImageProcessing: self.hass.stop() def test_setup_component(self): - """Setup demo platform on image_process component.""" + """Set up demo platform on image_process component.""" config = { ip.DOMAIN: { 'platform': 'demo' @@ -35,7 +35,7 @@ class TestSetupImageProcessing: setup_component(self.hass, ip.DOMAIN, config) def test_setup_component_with_service(self): - """Setup demo platform on image_process component test service.""" + """Set up demo platform on image_process component test service.""" config = { ip.DOMAIN: { 'platform': 'demo' @@ -52,7 +52,7 @@ class TestImageProcessing: """Test class for image processing.""" 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() setup_component( @@ -113,7 +113,7 @@ class TestImageProcessingAlpr: """Test class for alpr image processing.""" 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() config = { @@ -149,7 +149,7 @@ class TestImageProcessingAlpr: self.hass.stop() def test_alpr_event_single_call(self, aioclient_mock): - """Setup and scan a picture and test plates from event.""" + """Set up and scan a picture and test plates from event.""" aioclient_mock.get(self.url, content=b'image') ip.scan(self.hass, entity_id='image_processing.demo_alpr') @@ -168,7 +168,7 @@ class TestImageProcessingAlpr: assert event_data[0]['entity_id'] == 'image_processing.demo_alpr' def test_alpr_event_double_call(self, aioclient_mock): - """Setup and scan a picture and test plates from event.""" + """Set up and scan a picture and test plates from event.""" aioclient_mock.get(self.url, content=b'image') ip.scan(self.hass, entity_id='image_processing.demo_alpr') @@ -192,7 +192,7 @@ class TestImageProcessingAlpr: new_callable=PropertyMock(return_value=95)) def test_alpr_event_single_call_confidence(self, confidence_mock, aioclient_mock): - """Setup and scan a picture and test plates from event.""" + """Set up and scan a picture and test plates from event.""" aioclient_mock.get(self.url, content=b'image') ip.scan(self.hass, entity_id='image_processing.demo_alpr') @@ -215,7 +215,7 @@ class TestImageProcessingFace: """Test class for face image processing.""" 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() config = { @@ -251,7 +251,7 @@ class TestImageProcessingFace: self.hass.stop() def test_face_event_call(self, aioclient_mock): - """Setup and scan a picture and test faces from event.""" + """Set up and scan a picture and test faces from event.""" aioclient_mock.get(self.url, content=b'image') ip.scan(self.hass, entity_id='image_processing.demo_face') @@ -276,7 +276,7 @@ class TestImageProcessingFace: 'DemoImageProcessingFace.confidence', new_callable=PropertyMock(return_value=None)) def test_face_event_call_no_confidence(self, mock_config, aioclient_mock): - """Setup and scan a picture and test faces from event.""" + """Set up and scan a picture and test faces from event.""" aioclient_mock.get(self.url, content=b'image') ip.scan(self.hass, entity_id='image_processing.demo_face') diff --git a/tests/components/image_processing/test_microsoft_face_detect.py b/tests/components/image_processing/test_microsoft_face_detect.py index acc2519c9b7..9047c5b8475 100644 --- a/tests/components/image_processing/test_microsoft_face_detect.py +++ b/tests/components/image_processing/test_microsoft_face_detect.py @@ -15,7 +15,7 @@ class TestMicrosoftFaceDetectSetup: """Test class for image processing.""" 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() def teardown_method(self): @@ -25,7 +25,7 @@ class TestMicrosoftFaceDetectSetup: @patch('homeassistant.components.microsoft_face.' 'MicrosoftFace.update_store', return_value=mock_coro()) def test_setup_platform(self, store_mock): - """Setup platform with one entity.""" + """Set up platform with one entity.""" config = { ip.DOMAIN: { 'platform': 'microsoft_face_detect', @@ -51,7 +51,7 @@ class TestMicrosoftFaceDetectSetup: @patch('homeassistant.components.microsoft_face.' 'MicrosoftFace.update_store', return_value=mock_coro()) def test_setup_platform_name(self, store_mock): - """Setup platform with one entity and set name.""" + """Set up platform with one entity and set name.""" config = { ip.DOMAIN: { 'platform': 'microsoft_face_detect', @@ -78,7 +78,7 @@ class TestMicrosoftFaceDetect: """Test class for image processing.""" 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() self.config = { @@ -108,7 +108,7 @@ class TestMicrosoftFaceDetect: 'MicrosoftFaceDetectEntity.should_poll', new_callable=PropertyMock(return_value=False)) def test_ms_detect_process_image(self, poll_mock, aioclient_mock): - """Setup and scan a picture and test plates from event.""" + """Set up and scan a picture and test plates from event.""" aioclient_mock.get( self.endpoint_url.format("persongroups"), text=load_fixture('microsoft_face_persongroups.json') diff --git a/tests/components/image_processing/test_microsoft_face_identify.py b/tests/components/image_processing/test_microsoft_face_identify.py index 8797f661767..6d3eae38728 100644 --- a/tests/components/image_processing/test_microsoft_face_identify.py +++ b/tests/components/image_processing/test_microsoft_face_identify.py @@ -15,7 +15,7 @@ class TestMicrosoftFaceIdentifySetup: """Test class for image processing.""" 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() def teardown_method(self): @@ -25,7 +25,7 @@ class TestMicrosoftFaceIdentifySetup: @patch('homeassistant.components.microsoft_face.' 'MicrosoftFace.update_store', return_value=mock_coro()) def test_setup_platform(self, store_mock): - """Setup platform with one entity.""" + """Set up platform with one entity.""" config = { ip.DOMAIN: { 'platform': 'microsoft_face_identify', @@ -51,7 +51,7 @@ class TestMicrosoftFaceIdentifySetup: @patch('homeassistant.components.microsoft_face.' 'MicrosoftFace.update_store', return_value=mock_coro()) def test_setup_platform_name(self, store_mock): - """Setup platform with one entity and set name.""" + """Set up platform with one entity and set name.""" config = { ip.DOMAIN: { 'platform': 'microsoft_face_identify', @@ -79,7 +79,7 @@ class TestMicrosoftFaceIdentify: """Test class for image processing.""" 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() self.config = { @@ -109,7 +109,7 @@ class TestMicrosoftFaceIdentify: 'MicrosoftFaceIdentifyEntity.should_poll', new_callable=PropertyMock(return_value=False)) def test_ms_identify_process_image(self, poll_mock, aioclient_mock): - """Setup and scan a picture and test plates from event.""" + """Set up and scan a picture and test plates from event.""" aioclient_mock.get( self.endpoint_url.format("persongroups"), text=load_fixture('microsoft_face_persongroups.json') diff --git a/tests/components/image_processing/test_openalpr_cloud.py b/tests/components/image_processing/test_openalpr_cloud.py index 65e735a6f7e..2d6015e3fe7 100644 --- a/tests/components/image_processing/test_openalpr_cloud.py +++ b/tests/components/image_processing/test_openalpr_cloud.py @@ -16,7 +16,7 @@ class TestOpenAlprCloudSetup: """Test class for image processing.""" 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() def teardown_method(self): @@ -24,7 +24,7 @@ class TestOpenAlprCloudSetup: self.hass.stop() def test_setup_platform(self): - """Setup platform with one entity.""" + """Set up platform with one entity.""" config = { ip.DOMAIN: { 'platform': 'openalpr_cloud', @@ -45,7 +45,7 @@ class TestOpenAlprCloudSetup: assert self.hass.states.get('image_processing.openalpr_demo_camera') def test_setup_platform_name(self): - """Setup platform with one entity and set name.""" + """Set up platform with one entity and set name.""" config = { ip.DOMAIN: { 'platform': 'openalpr_cloud', @@ -67,7 +67,7 @@ class TestOpenAlprCloudSetup: assert self.hass.states.get('image_processing.test_local') def test_setup_platform_without_api_key(self): - """Setup platform with one entity without api_key.""" + """Set up platform with one entity without api_key.""" config = { ip.DOMAIN: { 'platform': 'openalpr_cloud', @@ -85,7 +85,7 @@ class TestOpenAlprCloudSetup: setup_component(self.hass, ip.DOMAIN, config) def test_setup_platform_without_region(self): - """Setup platform with one entity without region.""" + """Set up platform with one entity without region.""" config = { ip.DOMAIN: { 'platform': 'openalpr_cloud', @@ -107,7 +107,7 @@ class TestOpenAlprCloud: """Test class for image processing.""" 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() config = { @@ -151,7 +151,7 @@ class TestOpenAlprCloud: self.hass.stop() def test_openalpr_process_image(self, aioclient_mock): - """Setup and scan a picture and test plates from event.""" + """Set up and scan a picture and test plates from event.""" aioclient_mock.post( OPENALPR_API_URL, params=self.params, text=load_fixture('alpr_cloud.json'), status=200 @@ -179,7 +179,7 @@ class TestOpenAlprCloud: 'image_processing.test_local' def test_openalpr_process_image_api_error(self, aioclient_mock): - """Setup and scan a picture and test api error.""" + """Set up and scan a picture and test api error.""" aioclient_mock.post( OPENALPR_API_URL, params=self.params, text="{'error': 'error message'}", status=400 @@ -195,7 +195,7 @@ class TestOpenAlprCloud: assert len(self.alpr_events) == 0 def test_openalpr_process_image_api_timeout(self, aioclient_mock): - """Setup and scan a picture and test api error.""" + """Set up and scan a picture and test api error.""" aioclient_mock.post( OPENALPR_API_URL, params=self.params, exc=asyncio.TimeoutError() diff --git a/tests/components/image_processing/test_openalpr_local.py b/tests/components/image_processing/test_openalpr_local.py index 38e94166c5a..772d66670a0 100644 --- a/tests/components/image_processing/test_openalpr_local.py +++ b/tests/components/image_processing/test_openalpr_local.py @@ -30,7 +30,7 @@ class TestOpenAlprLocalSetup: """Test class for image processing.""" 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() def teardown_method(self): @@ -38,7 +38,7 @@ class TestOpenAlprLocalSetup: self.hass.stop() def test_setup_platform(self): - """Setup platform with one entity.""" + """Set up platform with one entity.""" config = { ip.DOMAIN: { 'platform': 'openalpr_local', @@ -58,7 +58,7 @@ class TestOpenAlprLocalSetup: assert self.hass.states.get('image_processing.openalpr_demo_camera') def test_setup_platform_name(self): - """Setup platform with one entity and set name.""" + """Set up platform with one entity and set name.""" config = { ip.DOMAIN: { 'platform': 'openalpr_local', @@ -79,7 +79,7 @@ class TestOpenAlprLocalSetup: assert self.hass.states.get('image_processing.test_local') def test_setup_platform_without_region(self): - """Setup platform with one entity without region.""" + """Set up platform with one entity without region.""" config = { ip.DOMAIN: { 'platform': 'openalpr_local', @@ -100,7 +100,7 @@ class TestOpenAlprLocal: """Test class for image processing.""" 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() config = { @@ -143,7 +143,7 @@ class TestOpenAlprLocal: @patch('asyncio.create_subprocess_exec', return_value=mock_async_subprocess()) def test_openalpr_process_image(self, popen_mock, aioclient_mock): - """Setup and scan a picture and test plates from event.""" + """Set up and scan a picture and test plates from event.""" aioclient_mock.get(self.url, content=b'image') ip.scan(self.hass, entity_id='image_processing.test_local') diff --git a/tests/components/light/test_demo.py b/tests/components/light/test_demo.py index 8ba6385166b..db575bba5ba 100644 --- a/tests/components/light/test_demo.py +++ b/tests/components/light/test_demo.py @@ -15,7 +15,7 @@ class TestDemoLight(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.assertTrue(setup_component(self.hass, light.DOMAIN, {'light': { 'platform': 'demo', diff --git a/tests/components/light/test_init.py b/tests/components/light/test_init.py index 0f73c5a38c6..66dbadb5c38 100644 --- a/tests/components/light/test_init.py +++ b/tests/components/light/test_init.py @@ -22,7 +22,7 @@ class TestLight(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() # pylint: disable=invalid-name diff --git a/tests/components/light/test_litejet.py b/tests/components/light/test_litejet.py index dd4b4b4a56e..3040c95e0ac 100644 --- a/tests/components/light/test_litejet.py +++ b/tests/components/light/test_litejet.py @@ -21,7 +21,7 @@ class TestLiteJetLight(unittest.TestCase): @mock.patch('pylitejet.LiteJet') def setup_method(self, method, mock_pylitejet): - """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.hass.start() diff --git a/tests/components/light/test_mochad.py b/tests/components/light/test_mochad.py index 5c82ab06085..68cdffcd999 100644 --- a/tests/components/light/test_mochad.py +++ b/tests/components/light/test_mochad.py @@ -28,7 +28,7 @@ class TestMochadSwitchSetup(unittest.TestCase): THING = 'light' 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() def tearDown(self): @@ -57,7 +57,7 @@ class TestMochadLight(unittest.TestCase): """Test for mochad light platform.""" 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() controller_mock = mock.MagicMock() dev_dict = {'address': 'a1', 'name': 'fake_light', @@ -94,7 +94,7 @@ class TestMochadLight256Levels(unittest.TestCase): """Test for mochad light platform.""" 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() controller_mock = mock.MagicMock() dev_dict = {'address': 'a1', 'name': 'fake_light', @@ -126,7 +126,7 @@ class TestMochadLight64Levels(unittest.TestCase): """Test for mochad light platform.""" 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() controller_mock = mock.MagicMock() dev_dict = {'address': 'a1', 'name': 'fake_light', diff --git a/tests/components/light/test_mqtt.py b/tests/components/light/test_mqtt.py index 404d60c0a2e..1245411dcc4 100644 --- a/tests/components/light/test_mqtt.py +++ b/tests/components/light/test_mqtt.py @@ -158,7 +158,7 @@ class TestLightMQTT(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.mock_publish = mock_mqtt_component(self.hass) diff --git a/tests/components/light/test_mqtt_json.py b/tests/components/light/test_mqtt_json.py index f16685b3575..90875285f17 100644 --- a/tests/components/light/test_mqtt_json.py +++ b/tests/components/light/test_mqtt_json.py @@ -107,7 +107,7 @@ class TestLightMQTTJSON(unittest.TestCase): """Test the MQTT JSON light.""" 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() self.mock_publish = mock_mqtt_component(self.hass) diff --git a/tests/components/light/test_mqtt_template.py b/tests/components/light/test_mqtt_template.py index 1cf09f2ccb5..8f92d659b9b 100644 --- a/tests/components/light/test_mqtt_template.py +++ b/tests/components/light/test_mqtt_template.py @@ -43,7 +43,7 @@ class TestLightMQTTTemplate(unittest.TestCase): """Test the MQTT Template light.""" 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() self.mock_publish = mock_mqtt_component(self.hass) diff --git a/tests/components/light/test_rfxtrx.py b/tests/components/light/test_rfxtrx.py index a1f63e45748..8a8e94ec179 100644 --- a/tests/components/light/test_rfxtrx.py +++ b/tests/components/light/test_rfxtrx.py @@ -14,7 +14,7 @@ class TestLightRfxtrx(unittest.TestCase): """Test the Rfxtrx light platform.""" 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() mock_component(self.hass, 'rfxtrx') diff --git a/tests/components/light/test_template.py b/tests/components/light/test_template.py index 962760672f1..cc481fabb5c 100644 --- a/tests/components/light/test_template.py +++ b/tests/components/light/test_template.py @@ -20,7 +20,7 @@ class TestTemplateLight: # 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() self.calls = [] diff --git a/tests/components/lock/test_demo.py b/tests/components/lock/test_demo.py index 1d774248f35..500cc7f9a6a 100644 --- a/tests/components/lock/test_demo.py +++ b/tests/components/lock/test_demo.py @@ -14,7 +14,7 @@ class TestLockDemo(unittest.TestCase): """Test the demo lock.""" 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() self.assertTrue(setup_component(self.hass, lock.DOMAIN, { 'lock': { diff --git a/tests/components/lock/test_mqtt.py b/tests/components/lock/test_mqtt.py index f87b8f8b74b..4ef8532f39e 100644 --- a/tests/components/lock/test_mqtt.py +++ b/tests/components/lock/test_mqtt.py @@ -13,7 +13,7 @@ class TestLockMQTT(unittest.TestCase): """Test the MQTT lock.""" 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() self.mock_publish = mock_mqtt_component(self.hass) diff --git a/tests/components/media_player/test_async_helpers.py b/tests/components/media_player/test_async_helpers.py index 11e324e9132..5908ea02a37 100644 --- a/tests/components/media_player/test_async_helpers.py +++ b/tests/components/media_player/test_async_helpers.py @@ -123,7 +123,7 @@ class TestAsyncMediaPlayer(unittest.TestCase): """Test the media_player module.""" 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() self.player = AsyncMediaPlayer(self.hass) @@ -176,7 +176,7 @@ class TestSyncMediaPlayer(unittest.TestCase): """Test the media_player module.""" 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() self.player = SyncMediaPlayer(self.hass) diff --git a/tests/components/media_player/test_cast.py b/tests/components/media_player/test_cast.py index 47be39c68e5..8364d8c96ef 100644 --- a/tests/components/media_player/test_cast.py +++ b/tests/components/media_player/test_cast.py @@ -48,7 +48,7 @@ def get_fake_chromecast_info(host='192.168.178.42', port=8009, async def async_setup_cast(hass, config=None, discovery_info=None): - """Helper to setup the cast platform.""" + """Helper to set up the cast platform.""" if config is None: config = {} add_devices = Mock() @@ -62,7 +62,7 @@ async def async_setup_cast(hass, config=None, discovery_info=None): async def async_setup_cast_internal_discovery(hass, config=None, discovery_info=None): - """Setup the cast platform and the discovery.""" + """Set up the cast platform and the discovery.""" listener = MagicMock(services={}) with patch('pychromecast.start_discovery', @@ -85,7 +85,7 @@ async def async_setup_cast_internal_discovery(hass, config=None, async def async_setup_media_player_cast(hass: HomeAssistantType, info: ChromecastInfo): - """Setup the cast platform with async_setup_component.""" + """Set up the cast platform with async_setup_component.""" chromecast = get_fake_chromecast(info) cast.CastStatusListener = MagicMock() diff --git a/tests/components/media_player/test_demo.py b/tests/components/media_player/test_demo.py index 65ca2eb6a01..121018e7541 100644 --- a/tests/components/media_player/test_demo.py +++ b/tests/components/media_player/test_demo.py @@ -25,7 +25,7 @@ class TestDemoMediaPlayer(unittest.TestCase): """Test the media_player module.""" 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): @@ -227,7 +227,7 @@ class TestMediaPlayerWeb(unittest.TestCase): """Test the media player web views sensor.""" 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() assert setup_component(self.hass, http.DOMAIN, { diff --git a/tests/components/media_player/test_sonos.py b/tests/components/media_player/test_sonos.py index 7d0d675f66f..cd2ce2b9707 100644 --- a/tests/components/media_player/test_sonos.py +++ b/tests/components/media_player/test_sonos.py @@ -135,7 +135,7 @@ class TestSonosMediaPlayer(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() def monkey_available(self): diff --git a/tests/components/media_player/test_soundtouch.py b/tests/components/media_player/test_soundtouch.py index 2da2622e08a..62356e6afca 100644 --- a/tests/components/media_player/test_soundtouch.py +++ b/tests/components/media_player/test_soundtouch.py @@ -148,7 +148,7 @@ class TestSoundtouchMediaPlayer(unittest.TestCase): """Bose Soundtouch test 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() logging.disable(logging.CRITICAL) diff --git a/tests/components/media_player/test_universal.py b/tests/components/media_player/test_universal.py index c9a1cdc79d8..ab8e316422a 100644 --- a/tests/components/media_player/test_universal.py +++ b/tests/components/media_player/test_universal.py @@ -158,7 +158,7 @@ class TestMediaPlayer(unittest.TestCase): """Test the media_player module.""" 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() self.mock_mp_1 = MockMediaPlayer(self.hass, 'mock1') diff --git a/tests/components/media_player/test_yamaha.py b/tests/components/media_player/test_yamaha.py index 980284737a2..a55429c0c7b 100644 --- a/tests/components/media_player/test_yamaha.py +++ b/tests/components/media_player/test_yamaha.py @@ -33,7 +33,7 @@ class TestYamahaMediaPlayer(unittest.TestCase): """Test the Yamaha media player.""" 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.main_zone = _create_zone_mock('Main zone', 'http://main') self.device = FakeYamahaDevice( diff --git a/tests/components/mqtt/test_init.py b/tests/components/mqtt/test_init.py index 05c5de71b8c..89836c34f22 100644 --- a/tests/components/mqtt/test_init.py +++ b/tests/components/mqtt/test_init.py @@ -45,7 +45,7 @@ class TestMQTTComponent(unittest.TestCase): """Test the MQTT component.""" 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) self.calls = [] @@ -188,7 +188,7 @@ class TestMQTTCallbacks(unittest.TestCase): """Test the MQTT callbacks.""" 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_client(self.hass) self.calls = [] diff --git a/tests/components/mqtt/test_server.py b/tests/components/mqtt/test_server.py index d5d54f457d6..c761c47542f 100644 --- a/tests/components/mqtt/test_server.py +++ b/tests/components/mqtt/test_server.py @@ -18,7 +18,7 @@ class TestMQTT: """Test the MQTT component.""" 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): @@ -33,7 +33,7 @@ class TestMQTT: def test_creating_config_with_http_pass_only(self, mock_mqtt): """Test if the MQTT server failed starts. - Since 0.77, MQTT server has to setup its own password. + Since 0.77, MQTT server has to set up its own password. If user has api_password but don't have mqtt.password, MQTT component will fail to start """ @@ -51,7 +51,7 @@ class TestMQTT: def test_creating_config_with_pass_and_no_http_pass(self, mock_mqtt): """Test if the MQTT server gets started with password. - Since 0.77, MQTT server has to setup its own password. + Since 0.77, MQTT server has to set up its own password. """ mock_mqtt().async_connect.return_value = mock_coro(True) self.hass.bus.listen_once = MagicMock() @@ -74,7 +74,7 @@ class TestMQTT: def test_creating_config_with_pass_and_http_pass(self, mock_mqtt): """Test if the MQTT server gets started with password. - Since 0.77, MQTT server has to setup its own password. + Since 0.77, MQTT server has to set up its own password. """ mock_mqtt().async_connect.return_value = mock_coro(True) self.hass.bus.listen_once = MagicMock() diff --git a/tests/components/notify/test_apns.py b/tests/components/notify/test_apns.py index 0bd0333a6fb..dc120dc4ff6 100644 --- a/tests/components/notify/test_apns.py +++ b/tests/components/notify/test_apns.py @@ -28,7 +28,7 @@ class TestApns(unittest.TestCase): """Test the APNS component.""" 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 diff --git a/tests/components/notify/test_command_line.py b/tests/components/notify/test_command_line.py index 2575e1418f4..57933063ba1 100644 --- a/tests/components/notify/test_command_line.py +++ b/tests/components/notify/test_command_line.py @@ -13,7 +13,7 @@ class TestCommandLine(unittest.TestCase): """Test the command line notifications.""" 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 diff --git a/tests/components/notify/test_demo.py b/tests/components/notify/test_demo.py index 71b472afe74..f98fa258186 100644 --- a/tests/components/notify/test_demo.py +++ b/tests/components/notify/test_demo.py @@ -20,7 +20,7 @@ class TestNotifyDemo(unittest.TestCase): """Test the demo notify.""" 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() self.events = [] self.calls = [] diff --git a/tests/components/notify/test_file.py b/tests/components/notify/test_file.py index d59bbe4d720..fb4ab42e97b 100644 --- a/tests/components/notify/test_file.py +++ b/tests/components/notify/test_file.py @@ -16,7 +16,7 @@ class TestNotifyFile(unittest.TestCase): """Test the file notify.""" 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 diff --git a/tests/components/notify/test_group.py b/tests/components/notify/test_group.py index 8e7ef4348f7..bbd7c11ffeb 100644 --- a/tests/components/notify/test_group.py +++ b/tests/components/notify/test_group.py @@ -14,7 +14,7 @@ class TestNotifyGroup(unittest.TestCase): """Test the notify.group 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() self.events = [] self.service1 = demo.DemoNotificationService(self.hass) diff --git a/tests/components/notify/test_smtp.py b/tests/components/notify/test_smtp.py index 29e34974c6c..fca0e3c79e3 100644 --- a/tests/components/notify/test_smtp.py +++ b/tests/components/notify/test_smtp.py @@ -19,7 +19,7 @@ class TestNotifySmtp(unittest.TestCase): """Test the smtp notify.""" 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() self.mailer = MockSMTP('localhost', 25, 5, 'test@test.com', 1, 'testuser', 'testpass', diff --git a/tests/components/persistent_notification/test_init.py b/tests/components/persistent_notification/test_init.py index df780675a18..a609247b839 100644 --- a/tests/components/persistent_notification/test_init.py +++ b/tests/components/persistent_notification/test_init.py @@ -9,7 +9,7 @@ class TestPersistentNotification: """Test persistent notification component.""" 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() setup_component(self.hass, pn.DOMAIN, {}) diff --git a/tests/components/recorder/test_init.py b/tests/components/recorder/test_init.py index 191c0d6e733..7460a65b0ce 100644 --- a/tests/components/recorder/test_init.py +++ b/tests/components/recorder/test_init.py @@ -19,7 +19,7 @@ class TestRecorder(unittest.TestCase): """Test the recorder module.""" 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() init_recorder_component(self.hass) self.hass.start() @@ -92,7 +92,7 @@ def hass_recorder(): hass = get_test_home_assistant() def setup_recorder(config=None): - """Setup with params.""" + """Set up with params.""" init_recorder_component(hass, config) hass.start() hass.block_till_done() diff --git a/tests/components/recorder/test_purge.py b/tests/components/recorder/test_purge.py index 91aa69b4484..f33236f0ceb 100644 --- a/tests/components/recorder/test_purge.py +++ b/tests/components/recorder/test_purge.py @@ -16,7 +16,7 @@ class TestRecorderPurge(unittest.TestCase): """Base class for common recorder tests.""" 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() init_recorder_component(self.hass) self.hass.start() diff --git a/tests/components/recorder/test_util.py b/tests/components/recorder/test_util.py index ad130b1ca91..83d109fcfc5 100644 --- a/tests/components/recorder/test_util.py +++ b/tests/components/recorder/test_util.py @@ -14,7 +14,7 @@ def hass_recorder(): hass = get_test_home_assistant() def setup_recorder(config=None): - """Setup with params.""" + """Set up with params.""" init_recorder_component(hass, config) hass.start() hass.block_till_done() diff --git a/tests/components/remote/test_demo.py b/tests/components/remote/test_demo.py index ed9968c2d10..a0290987ff2 100644 --- a/tests/components/remote/test_demo.py +++ b/tests/components/remote/test_demo.py @@ -15,7 +15,7 @@ class TestDemoRemote(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.assertTrue(setup_component(self.hass, remote.DOMAIN, {'remote': { 'platform': 'demo', diff --git a/tests/components/remote/test_init.py b/tests/components/remote/test_init.py index b4d2ff98688..d98ec941f8b 100644 --- a/tests/components/remote/test_init.py +++ b/tests/components/remote/test_init.py @@ -19,7 +19,7 @@ class TestRemote(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() # pylint: disable=invalid-name diff --git a/tests/components/scene/test_init.py b/tests/components/scene/test_init.py index a832e249832..3298d7648d9 100644 --- a/tests/components/scene/test_init.py +++ b/tests/components/scene/test_init.py @@ -14,7 +14,7 @@ class TestScene(unittest.TestCase): """Test the scene component.""" 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() test_light = loader.get_component(self.hass, 'light.test') test_light.init() diff --git a/tests/components/scene/test_litejet.py b/tests/components/scene/test_litejet.py index 37a9aa5b2b5..864ffc41735 100644 --- a/tests/components/scene/test_litejet.py +++ b/tests/components/scene/test_litejet.py @@ -21,7 +21,7 @@ class TestLiteJetScene(unittest.TestCase): @mock.patch('pylitejet.LiteJet') def setup_method(self, method, mock_pylitejet): - """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.hass.start() diff --git a/tests/components/sensor/test_command_line.py b/tests/components/sensor/test_command_line.py index 808f8cff6a1..82cdef014b9 100644 --- a/tests/components/sensor/test_command_line.py +++ b/tests/components/sensor/test_command_line.py @@ -11,7 +11,7 @@ class TestCommandSensorSensor(unittest.TestCase): """Test the Command line sensor.""" 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() def tearDown(self): diff --git a/tests/components/sensor/test_dyson.py b/tests/components/sensor/test_dyson.py index dcbafcae6e3..cc32872e6f0 100644 --- a/tests/components/sensor/test_dyson.py +++ b/tests/components/sensor/test_dyson.py @@ -52,7 +52,7 @@ class DysonTest(unittest.TestCase): """Dyson Sensor component test 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 diff --git a/tests/components/sensor/test_filter.py b/tests/components/sensor/test_filter.py index cf2cc9c4205..b0683b04aa0 100644 --- a/tests/components/sensor/test_filter.py +++ b/tests/components/sensor/test_filter.py @@ -17,7 +17,7 @@ class TestFilterSensor(unittest.TestCase): """Test the Data Filter sensor.""" 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() raw_values = [20, 19, 18, 21, 22, 0] self.values = [] diff --git a/tests/components/sensor/test_google_wifi.py b/tests/components/sensor/test_google_wifi.py index 1004c20b314..55afedab536 100644 --- a/tests/components/sensor/test_google_wifi.py +++ b/tests/components/sensor/test_google_wifi.py @@ -36,7 +36,7 @@ class TestGoogleWifiSetup(unittest.TestCase): """Tests for setting up the Google Wifi sensor platform.""" 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() def tearDown(self): @@ -83,7 +83,7 @@ class TestGoogleWifiSensor(unittest.TestCase): """Tests for Google Wifi sensor platform.""" 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() with requests_mock.Mocker() as mock_req: self.setup_api(MOCK_DATA, mock_req) @@ -93,7 +93,7 @@ class TestGoogleWifiSensor(unittest.TestCase): self.hass.stop() def setup_api(self, data, mock_req): - """Setup API with fake data.""" + """Set up API with fake data.""" resource = '{}{}{}'.format( 'http://', 'localhost', google_wifi.ENDPOINT) now = datetime(1970, month=1, day=1) diff --git a/tests/components/sensor/test_imap_email_content.py b/tests/components/sensor/test_imap_email_content.py index cd5c079a431..a07d94e3dcd 100644 --- a/tests/components/sensor/test_imap_email_content.py +++ b/tests/components/sensor/test_imap_email_content.py @@ -17,7 +17,7 @@ class FakeEMailReader: """A test class for sending test emails.""" def __init__(self, messages): - """Setup the fake email reader.""" + """Set up the fake email reader.""" self._messages = messages def connect(self): @@ -35,7 +35,7 @@ class EmailContentSensor(unittest.TestCase): """Test the IMAP email content sensor.""" 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() def tearDown(self): diff --git a/tests/components/sensor/test_mfi.py b/tests/components/sensor/test_mfi.py index ae967449ef2..a10246ad777 100644 --- a/tests/components/sensor/test_mfi.py +++ b/tests/components/sensor/test_mfi.py @@ -31,7 +31,7 @@ class TestMfiSensorSetup(unittest.TestCase): } 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): @@ -131,7 +131,7 @@ class TestMfiSensor(unittest.TestCase): """Test for mFi sensor platform.""" 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() self.port = mock.MagicMock() self.sensor = mfi.MfiSensor(self.port, self.hass) diff --git a/tests/components/sensor/test_mhz19.py b/tests/components/sensor/test_mhz19.py index 6d071489691..421035995dc 100644 --- a/tests/components/sensor/test_mhz19.py +++ b/tests/components/sensor/test_mhz19.py @@ -15,7 +15,7 @@ class TestMHZ19Sensor(unittest.TestCase): hass = None 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): diff --git a/tests/components/sensor/test_moldindicator.py b/tests/components/sensor/test_moldindicator.py index 32cd0206dec..4f1b40bf9ef 100644 --- a/tests/components/sensor/test_moldindicator.py +++ b/tests/components/sensor/test_moldindicator.py @@ -15,7 +15,7 @@ class TestSensorMoldIndicator(unittest.TestCase): """Test the MoldIndicator sensor.""" 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.hass.states.set('test.indoortemp', '20', {ATTR_UNIT_OF_MEASUREMENT: TEMP_CELSIUS}) diff --git a/tests/components/sensor/test_mqtt.py b/tests/components/sensor/test_mqtt.py index 234afff3418..feef647b7b7 100644 --- a/tests/components/sensor/test_mqtt.py +++ b/tests/components/sensor/test_mqtt.py @@ -20,7 +20,7 @@ class TestSensorMQTT(unittest.TestCase): """Test the MQTT sensor.""" 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) diff --git a/tests/components/sensor/test_mqtt_room.py b/tests/components/sensor/test_mqtt_room.py index c79017338e1..88fa611b2a6 100644 --- a/tests/components/sensor/test_mqtt_room.py +++ b/tests/components/sensor/test_mqtt_room.py @@ -50,7 +50,7 @@ class TestMQTTRoomSensor(unittest.TestCase): """Test the room presence sensor.""" 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) self.assertTrue(setup_component(self.hass, sensor.DOMAIN, { diff --git a/tests/components/sensor/test_rest.py b/tests/components/sensor/test_rest.py index f2362867979..4d40ad394cd 100644 --- a/tests/components/sensor/test_rest.py +++ b/tests/components/sensor/test_rest.py @@ -19,7 +19,7 @@ class TestRestSensorSetup(unittest.TestCase): """Tests for setting up the REST sensor platform.""" 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() def tearDown(self): @@ -121,7 +121,7 @@ class TestRestSensor(unittest.TestCase): """Tests for REST sensor platform.""" 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.initial_state = 'initial_state' self.rest = Mock('rest.RestData') @@ -267,7 +267,7 @@ class TestRestData(unittest.TestCase): """Tests for RestData.""" def setUp(self): - """Setup things to be run when tests are started.""" + """Set up things to be run when tests are started.""" self.method = "GET" self.resource = "http://localhost" self.verify_ssl = True diff --git a/tests/components/sensor/test_rfxtrx.py b/tests/components/sensor/test_rfxtrx.py index e049eabbe56..3f577127a11 100644 --- a/tests/components/sensor/test_rfxtrx.py +++ b/tests/components/sensor/test_rfxtrx.py @@ -15,7 +15,7 @@ class TestSensorRfxtrx(unittest.TestCase): """Test the Rfxtrx sensor platform.""" 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() mock_component(self.hass, 'rfxtrx') diff --git a/tests/components/sensor/test_season.py b/tests/components/sensor/test_season.py index 5c071982f7f..4c82399648e 100644 --- a/tests/components/sensor/test_season.py +++ b/tests/components/sensor/test_season.py @@ -66,7 +66,7 @@ class TestSeason(unittest.TestCase): self.DEVICE = device 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() def tearDown(self): diff --git a/tests/components/sensor/test_statistics.py b/tests/components/sensor/test_statistics.py index 48ebf720633..466b89cc0d1 100644 --- a/tests/components/sensor/test_statistics.py +++ b/tests/components/sensor/test_statistics.py @@ -17,7 +17,7 @@ class TestStatisticsSensor(unittest.TestCase): """Test the Statistics sensor.""" 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() self.values = [17, 20, 15.2, 5, 3.8, 9.2, 6.7, 14, 6] self.count = len(self.values) diff --git a/tests/components/sensor/test_tcp.py b/tests/components/sensor/test_tcp.py index 4c1e976ea51..cbc097955c8 100644 --- a/tests/components/sensor/test_tcp.py +++ b/tests/components/sensor/test_tcp.py @@ -39,7 +39,7 @@ class TestTCPSensor(unittest.TestCase): """Test the TCP Sensor.""" 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): diff --git a/tests/components/sensor/test_template.py b/tests/components/sensor/test_template.py index 6861d3a5070..2211f092d7b 100644 --- a/tests/components/sensor/test_template.py +++ b/tests/components/sensor/test_template.py @@ -11,7 +11,7 @@ class TestTemplateSensor: # 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() def teardown_method(self, method): diff --git a/tests/components/sensor/test_yweather.py b/tests/components/sensor/test_yweather.py index aeee47bfa80..8b3361a4360 100644 --- a/tests/components/sensor/test_yweather.py +++ b/tests/components/sensor/test_yweather.py @@ -129,7 +129,7 @@ class TestWeather(unittest.TestCase): """Test the Yahoo weather component.""" 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() def tearDown(self): diff --git a/tests/components/switch/test_command_line.py b/tests/components/switch/test_command_line.py index 40f999fa43b..9ec0507627d 100644 --- a/tests/components/switch/test_command_line.py +++ b/tests/components/switch/test_command_line.py @@ -17,7 +17,7 @@ class TestCommandSwitch(unittest.TestCase): """Test the command switch.""" 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() def tearDown(self): diff --git a/tests/components/switch/test_flux.py b/tests/components/switch/test_flux.py index 155ed85dac2..f9ea88c5254 100644 --- a/tests/components/switch/test_flux.py +++ b/tests/components/switch/test_flux.py @@ -17,7 +17,7 @@ class TestSwitchFlux(unittest.TestCase): """Test the Flux switch platform.""" 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() def tearDown(self): diff --git a/tests/components/switch/test_init.py b/tests/components/switch/test_init.py index 55e44299294..579898437ca 100644 --- a/tests/components/switch/test_init.py +++ b/tests/components/switch/test_init.py @@ -15,7 +15,7 @@ class TestSwitch(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() platform = loader.get_component(self.hass, 'switch.test') platform.init() diff --git a/tests/components/switch/test_litejet.py b/tests/components/switch/test_litejet.py index e0d6e290def..45e5509c169 100644 --- a/tests/components/switch/test_litejet.py +++ b/tests/components/switch/test_litejet.py @@ -21,7 +21,7 @@ class TestLiteJetSwitch(unittest.TestCase): @mock.patch('pylitejet.LiteJet') def setup_method(self, method, mock_pylitejet): - """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.hass.start() diff --git a/tests/components/switch/test_mfi.py b/tests/components/switch/test_mfi.py index ae3edec2102..d2bf3c57ab6 100644 --- a/tests/components/switch/test_mfi.py +++ b/tests/components/switch/test_mfi.py @@ -49,7 +49,7 @@ class TestMfiSwitch(unittest.TestCase): """Test for mFi switch platform.""" 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() self.port = mock.MagicMock() self.switch = mfi.MfiSwitch(self.port) diff --git a/tests/components/switch/test_mochad.py b/tests/components/switch/test_mochad.py index a5e6e2c9ae6..f241a4b9f61 100644 --- a/tests/components/switch/test_mochad.py +++ b/tests/components/switch/test_mochad.py @@ -29,7 +29,7 @@ class TestMochadSwitchSetup(unittest.TestCase): THING = 'switch' 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() def tearDown(self): @@ -58,7 +58,7 @@ class TestMochadSwitch(unittest.TestCase): """Test for mochad switch platform.""" 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() controller_mock = mock.MagicMock() dev_dict = {'address': 'a1', 'name': 'fake_switch'} diff --git a/tests/components/switch/test_mqtt.py b/tests/components/switch/test_mqtt.py index 7cd5a42b4a3..c9bfd02156f 100644 --- a/tests/components/switch/test_mqtt.py +++ b/tests/components/switch/test_mqtt.py @@ -15,7 +15,7 @@ class TestSwitchMQTT(unittest.TestCase): """Test the MQTT switch.""" 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() self.mock_publish = mock_mqtt_component(self.hass) diff --git a/tests/components/switch/test_rest.py b/tests/components/switch/test_rest.py index e3f11ec19a0..cb27ab40855 100644 --- a/tests/components/switch/test_rest.py +++ b/tests/components/switch/test_rest.py @@ -14,7 +14,7 @@ class TestRestSwitchSetup: """Tests for setting up the REST switch 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() def teardown_method(self): @@ -95,7 +95,7 @@ class TestRestSwitch: """Tests for REST switch 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() self.name = 'foo' self.method = 'post' diff --git a/tests/components/switch/test_rfxtrx.py b/tests/components/switch/test_rfxtrx.py index 938093aa95b..ae242a1dafb 100644 --- a/tests/components/switch/test_rfxtrx.py +++ b/tests/components/switch/test_rfxtrx.py @@ -14,7 +14,7 @@ class TestSwitchRfxtrx(unittest.TestCase): """Test the Rfxtrx switch platform.""" 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() mock_component(self.hass, 'rfxtrx') diff --git a/tests/components/switch/test_template.py b/tests/components/switch/test_template.py index 8f7bbda8e98..47766e31f4d 100644 --- a/tests/components/switch/test_template.py +++ b/tests/components/switch/test_template.py @@ -16,7 +16,7 @@ class TestTemplateSwitch: # 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() self.calls = [] diff --git a/tests/components/switch/test_wake_on_lan.py b/tests/components/switch/test_wake_on_lan.py index 167c3bb35ac..abe1532cec7 100644 --- a/tests/components/switch/test_wake_on_lan.py +++ b/tests/components/switch/test_wake_on_lan.py @@ -33,7 +33,7 @@ class TestWOLSwitch(unittest.TestCase): """Test the wol switch.""" 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() def tearDown(self): diff --git a/tests/components/test_alert.py b/tests/components/test_alert.py index d9eb33be37d..90d732ac38e 100644 --- a/tests/components/test_alert.py +++ b/tests/components/test_alert.py @@ -36,7 +36,7 @@ class TestAlert(unittest.TestCase): """Test the alert module.""" 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() def tearDown(self): diff --git a/tests/components/test_configurator.py b/tests/components/test_configurator.py index 809c02548dc..22f0d6646aa 100644 --- a/tests/components/test_configurator.py +++ b/tests/components/test_configurator.py @@ -13,7 +13,7 @@ class TestConfigurator(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() # pylint: disable=invalid-name diff --git a/tests/components/test_datadog.py b/tests/components/test_datadog.py index f1820c4d250..f9724989f97 100644 --- a/tests/components/test_datadog.py +++ b/tests/components/test_datadog.py @@ -20,7 +20,7 @@ class TestDatadog(unittest.TestCase): """Test the Datadog component.""" 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 diff --git a/tests/components/test_device_sun_light_trigger.py b/tests/components/test_device_sun_light_trigger.py index 774185c51c1..35d53f9a5c8 100644 --- a/tests/components/test_device_sun_light_trigger.py +++ b/tests/components/test_device_sun_light_trigger.py @@ -18,7 +18,7 @@ class TestDeviceSunLightTrigger(unittest.TestCase): """Test the device sun light trigger module.""" 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() self.scanner = loader.get_component( diff --git a/tests/components/test_dyson.py b/tests/components/test_dyson.py index 38f3e60dcf4..19c39754eb2 100644 --- a/tests/components/test_dyson.py +++ b/tests/components/test_dyson.py @@ -36,7 +36,7 @@ class DysonTest(unittest.TestCase): """Dyson parent component test 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 diff --git a/tests/components/test_ffmpeg.py b/tests/components/test_ffmpeg.py index 44c3a1dd695..76b1300774b 100644 --- a/tests/components/test_ffmpeg.py +++ b/tests/components/test_ffmpeg.py @@ -42,7 +42,7 @@ class TestFFmpegSetup: """Test class for ffmpeg.""" 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() def teardown_method(self): @@ -50,14 +50,14 @@ class TestFFmpegSetup: self.hass.stop() def test_setup_component(self): - """Setup ffmpeg component.""" + """Set up ffmpeg component.""" with assert_setup_component(2): setup_component(self.hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: {}}) assert self.hass.data[ffmpeg.DATA_FFMPEG].binary == 'ffmpeg' def test_setup_component_test_service(self): - """Setup ffmpeg component test services.""" + """Set up ffmpeg component test services.""" with assert_setup_component(2): setup_component(self.hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: {}}) @@ -68,7 +68,7 @@ class TestFFmpegSetup: @asyncio.coroutine def test_setup_component_test_register(hass): - """Setup ffmpeg component test register.""" + """Set up ffmpeg component test register.""" with assert_setup_component(2): yield from async_setup_component( hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: {}}) @@ -83,7 +83,7 @@ def test_setup_component_test_register(hass): @asyncio.coroutine def test_setup_component_test_register_no_startup(hass): - """Setup ffmpeg component test register without startup.""" + """Set up ffmpeg component test register without startup.""" with assert_setup_component(2): yield from async_setup_component( hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: {}}) @@ -98,7 +98,7 @@ def test_setup_component_test_register_no_startup(hass): @asyncio.coroutine def test_setup_component_test_service_start(hass): - """Setup ffmpeg component test service start.""" + """Set up ffmpeg component test service start.""" with assert_setup_component(2): yield from async_setup_component( hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: {}}) @@ -114,7 +114,7 @@ def test_setup_component_test_service_start(hass): @asyncio.coroutine def test_setup_component_test_service_stop(hass): - """Setup ffmpeg component test service stop.""" + """Set up ffmpeg component test service stop.""" with assert_setup_component(2): yield from async_setup_component( hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: {}}) @@ -130,7 +130,7 @@ def test_setup_component_test_service_stop(hass): @asyncio.coroutine def test_setup_component_test_service_restart(hass): - """Setup ffmpeg component test service restart.""" + """Set up ffmpeg component test service restart.""" with assert_setup_component(2): yield from async_setup_component( hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: {}}) @@ -147,7 +147,7 @@ def test_setup_component_test_service_restart(hass): @asyncio.coroutine def test_setup_component_test_service_start_with_entity(hass): - """Setup ffmpeg component test service start.""" + """Set up ffmpeg component test service start.""" with assert_setup_component(2): yield from async_setup_component( hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: {}}) @@ -164,7 +164,7 @@ def test_setup_component_test_service_start_with_entity(hass): @asyncio.coroutine def test_setup_component_test_run_test_false(hass): - """Setup ffmpeg component test run_test false.""" + """Set up ffmpeg component test run_test false.""" with assert_setup_component(2): yield from async_setup_component( hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: { @@ -180,7 +180,7 @@ def test_setup_component_test_run_test_false(hass): @asyncio.coroutine def test_setup_component_test_run_test(hass): - """Setup ffmpeg component test run_test.""" + """Set up ffmpeg component test run_test.""" with assert_setup_component(2): yield from async_setup_component( hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: {}}) @@ -206,7 +206,7 @@ def test_setup_component_test_run_test(hass): @asyncio.coroutine def test_setup_component_test_run_test_test_fail(hass): - """Setup ffmpeg component test run_test.""" + """Set up ffmpeg component test run_test.""" with assert_setup_component(2): yield from async_setup_component( hass, ffmpeg.DOMAIN, {ffmpeg.DOMAIN: {}}) diff --git a/tests/components/test_folder_watcher.py b/tests/components/test_folder_watcher.py index b5ac9cca9d9..451d9ae3e0e 100644 --- a/tests/components/test_folder_watcher.py +++ b/tests/components/test_folder_watcher.py @@ -8,7 +8,7 @@ from tests.common import MockDependency async def test_invalid_path_setup(hass): - """Test that an invalid path is not setup.""" + """Test that an invalid path is not set up.""" assert not await async_setup_component( hass, folder_watcher.DOMAIN, { folder_watcher.DOMAIN: { diff --git a/tests/components/test_google.py b/tests/components/test_google.py index 0ee066fcfee..b8dc29b5dea 100644 --- a/tests/components/test_google.py +++ b/tests/components/test_google.py @@ -14,7 +14,7 @@ class TestGoogle(unittest.TestCase): """Test the Google component.""" 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 diff --git a/tests/components/test_graphite.py b/tests/components/test_graphite.py index 892fe5b5f4d..7ceda9e191e 100644 --- a/tests/components/test_graphite.py +++ b/tests/components/test_graphite.py @@ -17,7 +17,7 @@ class TestGraphite(unittest.TestCase): """Test the Graphite component.""" 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() self.gf = graphite.GraphiteFeeder(self.hass, 'foo', 123, 'ha') diff --git a/tests/components/test_history.py b/tests/components/test_history.py index b348498b07e..ef2f7a17a19 100644 --- a/tests/components/test_history.py +++ b/tests/components/test_history.py @@ -17,7 +17,7 @@ class TestComponentHistory(unittest.TestCase): """Test History component.""" 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 diff --git a/tests/components/test_history_graph.py b/tests/components/test_history_graph.py index 554f7f29dd7..9b7733a7ec2 100644 --- a/tests/components/test_history_graph.py +++ b/tests/components/test_history_graph.py @@ -10,7 +10,7 @@ class TestGraph(unittest.TestCase): """Test the Google component.""" 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 diff --git a/tests/components/test_influxdb.py b/tests/components/test_influxdb.py index e2323aca855..7d1b7527612 100644 --- a/tests/components/test_influxdb.py +++ b/tests/components/test_influxdb.py @@ -21,7 +21,7 @@ class TestInfluxDB(unittest.TestCase): """Test the InfluxDB component.""" 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.handler_method = None self.hass.bus.listen = mock.Mock() @@ -96,7 +96,7 @@ class TestInfluxDB(unittest.TestCase): assert not setup_component(self.hass, influxdb.DOMAIN, config) def _setup(self, **kwargs): - """Setup the client.""" + """Set up the client.""" config = { 'influxdb': { 'host': 'host', diff --git a/tests/components/test_init.py b/tests/components/test_init.py index 1e565054637..355f3dc0e96 100644 --- a/tests/components/test_init.py +++ b/tests/components/test_init.py @@ -25,7 +25,7 @@ class TestComponentsCore(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.assertTrue(run_coroutine_threadsafe( comps.async_setup(self.hass, {}), self.hass.loop diff --git a/tests/components/test_input_boolean.py b/tests/components/test_input_boolean.py index e39b12481bc..964d1763e4e 100644 --- a/tests/components/test_input_boolean.py +++ b/tests/components/test_input_boolean.py @@ -22,7 +22,7 @@ class TestInputBoolean(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() # pylint: disable=invalid-name diff --git a/tests/components/test_input_datetime.py b/tests/components/test_input_datetime.py index 7277a8d7d3a..0d21061e022 100644 --- a/tests/components/test_input_datetime.py +++ b/tests/components/test_input_datetime.py @@ -26,7 +26,7 @@ class TestInputDatetime(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() # pylint: disable=invalid-name diff --git a/tests/components/test_input_number.py b/tests/components/test_input_number.py index fde940efa1a..d416dcae154 100644 --- a/tests/components/test_input_number.py +++ b/tests/components/test_input_number.py @@ -16,7 +16,7 @@ class TestInputNumber(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() # pylint: disable=invalid-name diff --git a/tests/components/test_input_select.py b/tests/components/test_input_select.py index 20d9656d8b0..82da80253c5 100644 --- a/tests/components/test_input_select.py +++ b/tests/components/test_input_select.py @@ -19,7 +19,7 @@ class TestInputSelect(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() # pylint: disable=invalid-name diff --git a/tests/components/test_input_text.py b/tests/components/test_input_text.py index c288375ec8f..405f7de8272 100644 --- a/tests/components/test_input_text.py +++ b/tests/components/test_input_text.py @@ -15,7 +15,7 @@ class TestInputText(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() # pylint: disable=invalid-name diff --git a/tests/components/test_introduction.py b/tests/components/test_introduction.py index 99b373961cc..b7099d04878 100644 --- a/tests/components/test_introduction.py +++ b/tests/components/test_introduction.py @@ -11,7 +11,7 @@ class TestIntroduction(unittest.TestCase): """Test Introduction.""" 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() def tearDown(self): diff --git a/tests/components/test_kira.py b/tests/components/test_kira.py index a80d766c3fd..67ab679800f 100644 --- a/tests/components/test_kira.py +++ b/tests/components/test_kira.py @@ -36,7 +36,7 @@ class TestKiraSetup(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() _base_mock = MagicMock() pykira = _base_mock.pykira diff --git a/tests/components/test_litejet.py b/tests/components/test_litejet.py index dfbcb9d99d8..3b46e9d274c 100644 --- a/tests/components/test_litejet.py +++ b/tests/components/test_litejet.py @@ -12,7 +12,7 @@ class TestLiteJet(unittest.TestCase): """Test the litejet component.""" 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() self.hass.start() self.hass.block_till_done() diff --git a/tests/components/test_logbook.py b/tests/components/test_logbook.py index a3a5273ed4e..cf78fbec352 100644 --- a/tests/components/test_logbook.py +++ b/tests/components/test_logbook.py @@ -26,7 +26,7 @@ class TestComponentLogbook(unittest.TestCase): EMPTY_CONFIG = logbook.CONFIG_SCHEMA({logbook.DOMAIN: {}}) 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() init_recorder_component(self.hass) # Force an in memory DB assert setup_component(self.hass, logbook.DOMAIN, self.EMPTY_CONFIG) diff --git a/tests/components/test_logentries.py b/tests/components/test_logentries.py index bff80c958f3..843a043cee6 100644 --- a/tests/components/test_logentries.py +++ b/tests/components/test_logentries.py @@ -14,7 +14,7 @@ class TestLogentries(unittest.TestCase): """Test the Logentries component.""" 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 diff --git a/tests/components/test_logger.py b/tests/components/test_logger.py index a55a66c6505..f774af2169c 100644 --- a/tests/components/test_logger.py +++ b/tests/components/test_logger.py @@ -24,7 +24,7 @@ class TestUpdater(unittest.TestCase): """Test logger component.""" 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.log_filter = None @@ -34,7 +34,7 @@ class TestUpdater(unittest.TestCase): self.hass.stop() def setup_logger(self, config): - """Setup logger and save log filter.""" + """Set up logger and save log filter.""" setup_component(self.hass, logger.DOMAIN, config) self.log_filter = logging.root.handlers[-1].filters[0] diff --git a/tests/components/test_microsoft_face.py b/tests/components/test_microsoft_face.py index 92f840b8033..601d5e7ebcc 100644 --- a/tests/components/test_microsoft_face.py +++ b/tests/components/test_microsoft_face.py @@ -13,7 +13,7 @@ class TestMicrosoftFaceSetup: """Test the microsoft face component.""" 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() self.config = { @@ -31,21 +31,21 @@ class TestMicrosoftFaceSetup: @patch('homeassistant.components.microsoft_face.' 'MicrosoftFace.update_store', return_value=mock_coro()) def test_setup_component(self, mock_update): - """Setup component.""" + """Set up component.""" with assert_setup_component(3, mf.DOMAIN): setup_component(self.hass, mf.DOMAIN, self.config) @patch('homeassistant.components.microsoft_face.' 'MicrosoftFace.update_store', return_value=mock_coro()) def test_setup_component_wrong_api_key(self, mock_update): - """Setup component without api key.""" + """Set up component without api key.""" with assert_setup_component(0, mf.DOMAIN): setup_component(self.hass, mf.DOMAIN, {mf.DOMAIN: {}}) @patch('homeassistant.components.microsoft_face.' 'MicrosoftFace.update_store', return_value=mock_coro()) def test_setup_component_test_service(self, mock_update): - """Setup component.""" + """Set up component.""" with assert_setup_component(3, mf.DOMAIN): setup_component(self.hass, mf.DOMAIN, self.config) @@ -57,7 +57,7 @@ class TestMicrosoftFaceSetup: assert self.hass.services.has_service(mf.DOMAIN, 'face_person') def test_setup_component_test_entities(self, aioclient_mock): - """Setup component.""" + """Set up component.""" aioclient_mock.get( self.endpoint_url.format("persongroups"), text=load_fixture('microsoft_face_persongroups.json') @@ -95,7 +95,7 @@ class TestMicrosoftFaceSetup: @patch('homeassistant.components.microsoft_face.' 'MicrosoftFace.update_store', return_value=mock_coro()) def test_service_groups(self, mock_update, aioclient_mock): - """Setup component, test groups services.""" + """Set up component, test groups services.""" aioclient_mock.put( self.endpoint_url.format("persongroups/service_group"), status=200, text="{}" @@ -123,7 +123,7 @@ class TestMicrosoftFaceSetup: assert len(aioclient_mock.mock_calls) == 2 def test_service_person(self, aioclient_mock): - """Setup component, test person services.""" + """Set up component, test person services.""" aioclient_mock.get( self.endpoint_url.format("persongroups"), text=load_fixture('microsoft_face_persongroups.json') @@ -175,7 +175,7 @@ class TestMicrosoftFaceSetup: @patch('homeassistant.components.microsoft_face.' 'MicrosoftFace.update_store', return_value=mock_coro()) def test_service_train(self, mock_update, aioclient_mock): - """Setup component, test train groups services.""" + """Set up component, test train groups services.""" with assert_setup_component(3, mf.DOMAIN): setup_component(self.hass, mf.DOMAIN, self.config) @@ -192,7 +192,7 @@ class TestMicrosoftFaceSetup: @patch('homeassistant.components.camera.async_get_image', return_value=mock_coro(camera.Image('image/jpeg', b'Test'))) def test_service_face(self, camera_mock, aioclient_mock): - """Setup component, test person face services.""" + """Set up component, test person face services.""" aioclient_mock.get( self.endpoint_url.format("persongroups"), text=load_fixture('microsoft_face_persongroups.json') @@ -229,7 +229,7 @@ class TestMicrosoftFaceSetup: @patch('homeassistant.components.microsoft_face.' 'MicrosoftFace.update_store', return_value=mock_coro()) def test_service_status_400(self, mock_update, aioclient_mock): - """Setup component, test groups services with error.""" + """Set up component, test groups services with error.""" aioclient_mock.put( self.endpoint_url.format("persongroups/service_group"), status=400, text="{'error': {'message': 'Error'}}" @@ -248,7 +248,7 @@ class TestMicrosoftFaceSetup: @patch('homeassistant.components.microsoft_face.' 'MicrosoftFace.update_store', return_value=mock_coro()) def test_service_status_timeout(self, mock_update, aioclient_mock): - """Setup component, test groups services with timeout.""" + """Set up component, test groups services with timeout.""" aioclient_mock.put( self.endpoint_url.format("persongroups/service_group"), status=400, exc=asyncio.TimeoutError() diff --git a/tests/components/test_mqtt_eventstream.py b/tests/components/test_mqtt_eventstream.py index 8da1311c87d..a6881672339 100644 --- a/tests/components/test_mqtt_eventstream.py +++ b/tests/components/test_mqtt_eventstream.py @@ -22,7 +22,7 @@ class TestMqttEventStream: """Test the MQTT eventstream module.""" 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() self.mock_mqtt = mock_mqtt_component(self.hass) diff --git a/tests/components/test_mqtt_statestream.py b/tests/components/test_mqtt_statestream.py index 4cf79e679cd..97c4c0647e8 100644 --- a/tests/components/test_mqtt_statestream.py +++ b/tests/components/test_mqtt_statestream.py @@ -16,7 +16,7 @@ class TestMqttStateStream: """Test the MQTT statestream module.""" 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() self.mock_mqtt = mock_mqtt_component(self.hass) diff --git a/tests/components/test_panel_iframe.py b/tests/components/test_panel_iframe.py index 214eda04ad8..3ac06c09a26 100644 --- a/tests/components/test_panel_iframe.py +++ b/tests/components/test_panel_iframe.py @@ -11,7 +11,7 @@ class TestPanelIframe(unittest.TestCase): """Test the panel_iframe component.""" 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() def tearDown(self): diff --git a/tests/components/test_pilight.py b/tests/components/test_pilight.py index 24052a56839..9304463b6fd 100644 --- a/tests/components/test_pilight.py +++ b/tests/components/test_pilight.py @@ -70,7 +70,7 @@ class TestPilight(unittest.TestCase): """Test the Pilight component.""" 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() self.skip_teardown_stop = False @@ -351,7 +351,7 @@ class TestPilightCallrateThrottler(unittest.TestCase): """Test the Throttler used to throttle calls to send_code.""" 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): diff --git a/tests/components/test_proximity.py b/tests/components/test_proximity.py index 42f1cbf4b43..f69ace46014 100644 --- a/tests/components/test_proximity.py +++ b/tests/components/test_proximity.py @@ -12,7 +12,7 @@ class TestProximity(unittest.TestCase): """Test the Proximity component.""" 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.hass.states.set( 'zone.home', 'zoning', diff --git a/tests/components/test_rest_command.py b/tests/components/test_rest_command.py index 097fb799d40..b66628a3562 100644 --- a/tests/components/test_rest_command.py +++ b/tests/components/test_rest_command.py @@ -14,7 +14,7 @@ class TestRestCommandSetup: """Test the rest command component.""" 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() self.config = { @@ -51,7 +51,7 @@ class TestRestCommandComponent: """Test the rest command component.""" def setup_method(self): - """Setup things to be run when tests are started.""" + """Set up things to be run when tests are started.""" self.url = "https://example.com/" self.config = { rc.DOMAIN: { @@ -81,7 +81,7 @@ class TestRestCommandComponent: self.hass.stop() def test_setup_tests(self): - """Setup test config and test it.""" + """Set up test config and test it.""" with assert_setup_component(4): setup_component(self.hass, rc.DOMAIN, self.config) diff --git a/tests/components/test_rfxtrx.py b/tests/components/test_rfxtrx.py index 1730d3a5371..93bf0b16dc5 100644 --- a/tests/components/test_rfxtrx.py +++ b/tests/components/test_rfxtrx.py @@ -15,7 +15,7 @@ class TestRFXTRX(unittest.TestCase): """Test the Rfxtrx component.""" 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() def tearDown(self): diff --git a/tests/components/test_rss_feed_template.py b/tests/components/test_rss_feed_template.py index 36f68e57c9f..64876dbea44 100644 --- a/tests/components/test_rss_feed_template.py +++ b/tests/components/test_rss_feed_template.py @@ -9,7 +9,7 @@ from homeassistant.setup import async_setup_component @pytest.fixture def mock_http_client(loop, hass, aiohttp_client): - """Setup test fixture.""" + """Set up test fixture.""" config = { 'rss_feed_template': { 'testfeed': { diff --git a/tests/components/test_script.py b/tests/components/test_script.py index c4282cdfbaf..8ad782cf697 100644 --- a/tests/components/test_script.py +++ b/tests/components/test_script.py @@ -18,7 +18,7 @@ class TestScriptComponent(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() # pylint: disable=invalid-name diff --git a/tests/components/test_shell_command.py b/tests/components/test_shell_command.py index a1acffd62e5..e945befbb84 100644 --- a/tests/components/test_shell_command.py +++ b/tests/components/test_shell_command.py @@ -33,7 +33,7 @@ class TestShellCommand(unittest.TestCase): """Test the shell_command component.""" 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. Also seems to require a child watcher attached to the loop when run from pytest. diff --git a/tests/components/test_splunk.py b/tests/components/test_splunk.py index 38143119112..173c822ddb6 100644 --- a/tests/components/test_splunk.py +++ b/tests/components/test_splunk.py @@ -16,7 +16,7 @@ class TestSplunk(unittest.TestCase): """Test the Splunk component.""" 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 diff --git a/tests/components/test_statsd.py b/tests/components/test_statsd.py index 5fd907fe0b1..6bd00e50646 100644 --- a/tests/components/test_statsd.py +++ b/tests/components/test_statsd.py @@ -16,7 +16,7 @@ class TestStatsd(unittest.TestCase): """Test the StatsD component.""" 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 diff --git a/tests/components/test_sun.py b/tests/components/test_sun.py index d5a4ecfcb81..aa94bf2bdd3 100644 --- a/tests/components/test_sun.py +++ b/tests/components/test_sun.py @@ -17,7 +17,7 @@ class TestSun(unittest.TestCase): """Test the sun module.""" 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() def tearDown(self): diff --git a/tests/components/test_updater.py b/tests/components/test_updater.py index 28ffcac2b13..23b669928f4 100644 --- a/tests/components/test_updater.py +++ b/tests/components/test_updater.py @@ -46,7 +46,7 @@ def test_new_version_shows_entity_after_hour( res = yield from async_setup_component( hass, updater.DOMAIN, {updater.DOMAIN: {}}) - assert res, 'Updater failed to setup' + assert res, 'Updater failed to set up' with patch('homeassistant.components.updater.current_version', MOCK_VERSION): @@ -65,7 +65,7 @@ def test_same_version_not_show_entity( res = yield from async_setup_component( hass, updater.DOMAIN, {updater.DOMAIN: {}}) - assert res, 'Updater failed to setup' + assert res, 'Updater failed to set up' with patch('homeassistant.components.updater.current_version', MOCK_VERSION): @@ -85,7 +85,7 @@ def test_disable_reporting(hass, mock_get_uuid, mock_get_newest_version): hass, updater.DOMAIN, {updater.DOMAIN: { 'reporting': False }}) - assert res, 'Updater failed to setup' + assert res, 'Updater failed to set up' with patch('homeassistant.components.updater.current_version', MOCK_VERSION): @@ -187,7 +187,7 @@ def test_new_version_shows_entity_after_hour_hassio( res = yield from async_setup_component( hass, updater.DOMAIN, {updater.DOMAIN: {}}) - assert res, 'Updater failed to setup' + assert res, 'Updater failed to set up' with patch('homeassistant.components.updater.current_version', MOCK_VERSION): diff --git a/tests/components/test_weblink.py b/tests/components/test_weblink.py index f35398e034c..8e71c89cdd6 100644 --- a/tests/components/test_weblink.py +++ b/tests/components/test_weblink.py @@ -11,7 +11,7 @@ class TestComponentWeblink(unittest.TestCase): """Test the Weblink component.""" 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() def tearDown(self): diff --git a/tests/components/tts/test_google.py b/tests/components/tts/test_google.py index cf9a7b2db29..f328e3e9f16 100644 --- a/tests/components/tts/test_google.py +++ b/tests/components/tts/test_google.py @@ -19,7 +19,7 @@ class TestTTSGooglePlatform: """Test the Google speech component.""" 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() self.url = "https://translate.google.com/translate_tts" diff --git a/tests/components/tts/test_init.py b/tests/components/tts/test_init.py index 0970f0d7490..719fe2716e7 100644 --- a/tests/components/tts/test_init.py +++ b/tests/components/tts/test_init.py @@ -33,7 +33,7 @@ class TestTTS: """Test the Google speech component.""" 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() self.demo_provider = DemoProvider('en') self.default_tts_cache = self.hass.config.path(tts.DEFAULT_CACHE_DIR) @@ -50,7 +50,7 @@ class TestTTS: shutil.rmtree(self.default_tts_cache) def test_setup_component_demo(self): - """Setup the demo platform with defaults.""" + """Set up the demo platform with defaults.""" config = { tts.DOMAIN: { 'platform': 'demo', @@ -65,7 +65,7 @@ class TestTTS: @patch('os.mkdir', side_effect=OSError(2, "No access")) def test_setup_component_demo_no_access_cache_folder(self, mock_mkdir): - """Setup the demo platform with defaults.""" + """Set up the demo platform with defaults.""" config = { tts.DOMAIN: { 'platform': 'demo', @@ -78,7 +78,7 @@ class TestTTS: assert not self.hass.services.has_service(tts.DOMAIN, 'clear_cache') def test_setup_component_and_test_service(self): - """Setup the demo platform and call service.""" + """Set up the demo platform and call service.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -106,7 +106,7 @@ class TestTTS: "265944c108cbb00b2a621be5930513e03a0bb2cd_en_-_demo.mp3")) def test_setup_component_and_test_service_with_config_language(self): - """Setup the demo platform and call service.""" + """Set up the demo platform and call service.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -135,7 +135,7 @@ class TestTTS: "265944c108cbb00b2a621be5930513e03a0bb2cd_de_-_demo.mp3")) def test_setup_component_and_test_service_with_wrong_conf_language(self): - """Setup the demo platform and call service with wrong config.""" + """Set up the demo platform and call service with wrong config.""" config = { tts.DOMAIN: { 'platform': 'demo', @@ -147,7 +147,7 @@ class TestTTS: setup_component(self.hass, tts.DOMAIN, config) def test_setup_component_and_test_service_with_service_language(self): - """Setup the demo platform and call service.""" + """Set up the demo platform and call service.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -176,7 +176,7 @@ class TestTTS: "265944c108cbb00b2a621be5930513e03a0bb2cd_de_-_demo.mp3")) def test_setup_component_test_service_with_wrong_service_language(self): - """Setup the demo platform and call service.""" + """Set up the demo platform and call service.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -200,7 +200,7 @@ class TestTTS: "265944c108cbb00b2a621be5930513e03a0bb2cd_lang_-_demo.mp3")) def test_setup_component_and_test_service_with_service_options(self): - """Setup the demo platform and call service with options.""" + """Set up the demo platform and call service with options.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -237,7 +237,7 @@ class TestTTS: @patch('homeassistant.components.tts.demo.DemoProvider.default_options', new_callable=PropertyMock(return_value={'voice': 'alex'})) def test_setup_component_and_test_with_service_options_def(self, def_mock): - """Setup the demo platform and call service with default options.""" + """Set up the demo platform and call service with default options.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -269,7 +269,7 @@ class TestTTS: opt_hash))) def test_setup_component_and_test_service_with_service_options_wrong(self): - """Setup the demo platform and call service with wrong options.""" + """Set up the demo platform and call service with wrong options.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -299,7 +299,7 @@ class TestTTS: opt_hash))) def test_setup_component_and_test_service_clear_cache(self): - """Setup the demo platform and call service clear cache.""" + """Set up the demo platform and call service clear cache.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -329,7 +329,7 @@ class TestTTS: "265944c108cbb00b2a621be5930513e03a0bb2cd_en_-_demo.mp3")) def test_setup_component_and_test_service_with_receive_voice(self): - """Setup the demo platform and call service and receive voice.""" + """Set up the demo platform and call service and receive voice.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -359,7 +359,7 @@ class TestTTS: assert req.content == demo_data def test_setup_component_and_test_service_with_receive_voice_german(self): - """Setup the demo platform and call service and receive voice.""" + """Set up the demo platform and call service and receive voice.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -390,7 +390,7 @@ class TestTTS: assert req.content == demo_data def test_setup_component_and_web_view_wrong_file(self): - """Setup the demo platform and receive wrong file from web.""" + """Set up the demo platform and receive wrong file from web.""" config = { tts.DOMAIN: { 'platform': 'demo', @@ -409,7 +409,7 @@ class TestTTS: assert req.status_code == 404 def test_setup_component_and_web_view_wrong_filename(self): - """Setup the demo platform and receive wrong filename from web.""" + """Set up the demo platform and receive wrong filename from web.""" config = { tts.DOMAIN: { 'platform': 'demo', @@ -428,7 +428,7 @@ class TestTTS: assert req.status_code == 404 def test_setup_component_test_without_cache(self): - """Setup demo platform without cache.""" + """Set up demo platform without cache.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -452,7 +452,7 @@ class TestTTS: "265944c108cbb00b2a621be5930513e03a0bb2cd_en_-_demo.mp3")) def test_setup_component_test_with_cache_call_service_without_cache(self): - """Setup demo platform with cache and call service without cache.""" + """Set up demo platform with cache and call service without cache.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -477,7 +477,7 @@ class TestTTS: "265944c108cbb00b2a621be5930513e03a0bb2cd_en_-_demo.mp3")) def test_setup_component_test_with_cache_dir(self): - """Setup demo platform with cache and call service without cache.""" + """Set up demo platform with cache and call service without cache.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) _, demo_data = self.demo_provider.get_tts_audio("bla", 'en') @@ -515,7 +515,7 @@ class TestTTS: @patch('homeassistant.components.tts.demo.DemoProvider.get_tts_audio', return_value=(None, None)) def test_setup_component_test_with_error_on_get_tts(self, tts_mock): - """Setup demo platform with wrong get_tts_audio.""" + """Set up demo platform with wrong get_tts_audio.""" calls = mock_service(self.hass, DOMAIN_MP, SERVICE_PLAY_MEDIA) config = { @@ -535,7 +535,7 @@ class TestTTS: assert len(calls) == 0 def test_setup_component_load_cache_retrieve_without_mem_cache(self): - """Setup component and load cache and get without mem cache.""" + """Set up component and load cache and get without mem cache.""" _, demo_data = self.demo_provider.get_tts_audio("bla", 'en') cache_file = os.path.join( self.default_tts_cache, @@ -565,7 +565,7 @@ class TestTTS: assert req.content == demo_data def test_setup_component_and_web_get_url(self): - """Setup the demo platform and receive wrong file from web.""" + """Set up the demo platform and receive wrong file from web.""" config = { tts.DOMAIN: { 'platform': 'demo', @@ -589,7 +589,7 @@ class TestTTS: .format(self.hass.config.api.base_url)) def test_setup_component_and_web_get_url_bad_config(self): - """Setup the demo platform and receive wrong file from web.""" + """Set up the demo platform and receive wrong file from web.""" config = { tts.DOMAIN: { 'platform': 'demo', diff --git a/tests/components/tts/test_marytts.py b/tests/components/tts/test_marytts.py index 7ec2ae39cd6..110473d75a8 100644 --- a/tests/components/tts/test_marytts.py +++ b/tests/components/tts/test_marytts.py @@ -18,7 +18,7 @@ class TestTTSMaryTTSPlatform: """Test the speech component.""" 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() self.url = "http://localhost:59125/process?" diff --git a/tests/components/tts/test_voicerss.py b/tests/components/tts/test_voicerss.py index 365cf1ff73b..334e35a9386 100644 --- a/tests/components/tts/test_voicerss.py +++ b/tests/components/tts/test_voicerss.py @@ -18,7 +18,7 @@ class TestTTSVoiceRSSPlatform: """Test the voicerss speech component.""" 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() self.url = "https://api.voicerss.org/" diff --git a/tests/components/tts/test_yandextts.py b/tests/components/tts/test_yandextts.py index 82d20318928..2675e322507 100644 --- a/tests/components/tts/test_yandextts.py +++ b/tests/components/tts/test_yandextts.py @@ -17,7 +17,7 @@ class TestTTSYandexPlatform: """Test the speech component.""" 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() self._base_url = "https://tts.voicetech.yandex.net/generate?" diff --git a/tests/components/vacuum/test_demo.py b/tests/components/vacuum/test_demo.py index bd6f2ae543c..1fc8f8cd5c1 100644 --- a/tests/components/vacuum/test_demo.py +++ b/tests/components/vacuum/test_demo.py @@ -30,7 +30,7 @@ class TestVacuumDemo(unittest.TestCase): """Test the Demo vacuum.""" 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() self.assertTrue(setup_component( self.hass, DOMAIN, {DOMAIN: {CONF_PLATFORM: 'demo'}})) diff --git a/tests/components/vacuum/test_dyson.py b/tests/components/vacuum/test_dyson.py index 8a4e6d57b91..5e32fc9daef 100644 --- a/tests/components/vacuum/test_dyson.py +++ b/tests/components/vacuum/test_dyson.py @@ -67,7 +67,7 @@ class DysonTest(unittest.TestCase): """Dyson 360 eye robot vacuum component test 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 diff --git a/tests/components/weather/test_darksky.py b/tests/components/weather/test_darksky.py index 41687451cd6..5423943e6fd 100644 --- a/tests/components/weather/test_darksky.py +++ b/tests/components/weather/test_darksky.py @@ -17,7 +17,7 @@ class TestDarkSky(unittest.TestCase): """Test the Dark Sky weather component.""" 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.hass.config.units = METRIC_SYSTEM self.lat = self.hass.config.latitude = 37.8267 diff --git a/tests/components/weather/test_ipma.py b/tests/components/weather/test_ipma.py index 7df6166a2b6..d438e118573 100644 --- a/tests/components/weather/test_ipma.py +++ b/tests/components/weather/test_ipma.py @@ -52,7 +52,7 @@ class TestIPMA(unittest.TestCase): """Test the IPMA weather component.""" 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.hass.config.units = METRIC_SYSTEM self.lat = self.hass.config.latitude = 40.00 diff --git a/tests/components/weather/test_weather.py b/tests/components/weather/test_weather.py index a88e9979551..42b1dacc5f8 100644 --- a/tests/components/weather/test_weather.py +++ b/tests/components/weather/test_weather.py @@ -17,7 +17,7 @@ class TestWeather(unittest.TestCase): """Test the Weather component.""" 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.hass.config.units = METRIC_SYSTEM self.assertTrue(setup_component(self.hass, weather.DOMAIN, { diff --git a/tests/components/weather/test_yweather.py b/tests/components/weather/test_yweather.py index 3e5eff9dae7..8ecaa67535e 100644 --- a/tests/components/weather/test_yweather.py +++ b/tests/components/weather/test_yweather.py @@ -83,7 +83,7 @@ class TestWeather(unittest.TestCase): self.DEVICES.append(device) 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.hass.config.units = METRIC_SYSTEM diff --git a/tests/components/zone/test_init.py b/tests/components/zone/test_init.py index 92dee05818d..ba98915e777 100644 --- a/tests/components/zone/test_init.py +++ b/tests/components/zone/test_init.py @@ -42,7 +42,7 @@ class TestComponentZone(unittest.TestCase): """Test the zone component.""" 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 diff --git a/tests/conftest.py b/tests/conftest.py index 28c47948666..61c5c1c7dd5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -"""Setup some common test helper things.""" +"""Set up some common test helper things.""" import asyncio import functools import logging diff --git a/tests/helpers/test_aiohttp_client.py b/tests/helpers/test_aiohttp_client.py index ccfe1b1aff9..699342381f9 100644 --- a/tests/helpers/test_aiohttp_client.py +++ b/tests/helpers/test_aiohttp_client.py @@ -30,7 +30,7 @@ class TestHelpersAiohttpClient(unittest.TestCase): """Test homeassistant.helpers.aiohttp_client module.""" 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): diff --git a/tests/helpers/test_condition.py b/tests/helpers/test_condition.py index aa7b5170648..69fab77715c 100644 --- a/tests/helpers/test_condition.py +++ b/tests/helpers/test_condition.py @@ -11,7 +11,7 @@ class TestConditionHelper: """Test condition helpers.""" 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): diff --git a/tests/helpers/test_config_entry_flow.py b/tests/helpers/test_config_entry_flow.py index 9eede7dff9b..a9b4dc158e0 100644 --- a/tests/helpers/test_config_entry_flow.py +++ b/tests/helpers/test_config_entry_flow.py @@ -49,7 +49,7 @@ async def test_user_no_devices_found(hass, flow_conf): async def test_user_no_confirmation(hass, flow_conf): - """Test user requires no confirmation to setup.""" + """Test user requires no confirmation to set up.""" flow = config_entries.HANDLERS['test']() flow.hass = hass flow_conf['discovered'] = True @@ -118,7 +118,7 @@ async def test_user_init_trumps_discovery(hass, flow_conf): async def test_import_no_confirmation(hass, flow_conf): - """Test import requires no confirmation to setup.""" + """Test import requires no confirmation to set up.""" flow = config_entries.HANDLERS['test']() flow.hass = hass flow_conf['discovered'] = True diff --git a/tests/helpers/test_discovery.py b/tests/helpers/test_discovery.py index c7b39954d85..8ee8d4596fe 100644 --- a/tests/helpers/test_discovery.py +++ b/tests/helpers/test_discovery.py @@ -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( diff --git a/tests/helpers/test_dispatcher.py b/tests/helpers/test_dispatcher.py index 55e67def2bc..ef1ad2336eb 100644 --- a/tests/helpers/test_dispatcher.py +++ b/tests/helpers/test_dispatcher.py @@ -12,7 +12,7 @@ class TestHelpersDispatcher: """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): diff --git a/tests/helpers/test_entity.py b/tests/helpers/test_entity.py index e24bec489f4..f9355f97ba3 100644 --- a/tests/helpers/test_entity.py +++ b/tests/helpers/test_entity.py @@ -75,7 +75,7 @@ class TestHelpersEntity: """Test homeassistant.helpers.entity module.""" 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.entity = entity.Entity() self.entity.entity_id = 'test.overwrite_hidden_true' self.hass = self.entity.hass = get_test_home_assistant() diff --git a/tests/helpers/test_entity_component.py b/tests/helpers/test_entity_component.py index b4910723c8d..1ce12e0b9ad 100644 --- a/tests/helpers/test_entity_component.py +++ b/tests/helpers/test_entity_component.py @@ -39,7 +39,7 @@ class TestHelpersEntityComponent(unittest.TestCase): self.hass.stop() def test_setting_up_group(self): - """Setup the setting of a group.""" + """Set up the setting of a group.""" setup_component(self.hass, 'group', {'group': {}}) component = EntityComponent(_LOGGER, DOMAIN, self.hass, group_name='everyone') diff --git a/tests/helpers/test_event.py b/tests/helpers/test_event.py index 73f2b9ff5a4..deefcec773a 100644 --- a/tests/helpers/test_event.py +++ b/tests/helpers/test_event.py @@ -37,7 +37,7 @@ class TestEventHelpers(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() # pylint: disable=invalid-name diff --git a/tests/helpers/test_location.py b/tests/helpers/test_location.py index 068e1a58ac2..22f69c18326 100644 --- a/tests/helpers/test_location.py +++ b/tests/helpers/test_location.py @@ -7,15 +7,15 @@ from homeassistant.helpers import location class TestHelpersLocation(unittest.TestCase): - """Setup the tests.""" + """Set up the tests.""" def test_has_location_with_invalid_states(self): - """Setup the tests.""" + """Set up the tests.""" for state in (None, 1, "hello", object): self.assertFalse(location.has_location(state)) def test_has_location_with_states_with_invalid_locations(self): - """Setup the tests.""" + """Set up the tests.""" state = State('hello.world', 'invalid', { ATTR_LATITUDE: 'no number', ATTR_LONGITUDE: 123.12 @@ -23,7 +23,7 @@ class TestHelpersLocation(unittest.TestCase): self.assertFalse(location.has_location(state)) def test_has_location_with_states_with_valid_location(self): - """Setup the tests.""" + """Set up the tests.""" state = State('hello.world', 'invalid', { ATTR_LATITUDE: 123.12, ATTR_LONGITUDE: 123.12 @@ -31,7 +31,7 @@ class TestHelpersLocation(unittest.TestCase): self.assertTrue(location.has_location(state)) def test_closest_with_no_states_with_location(self): - """Setup the tests.""" + """Set up the tests.""" state = State('light.test', 'on') state2 = State('light.test', 'on', { ATTR_LATITUDE: 'invalid', diff --git a/tests/helpers/test_script.py b/tests/helpers/test_script.py index 7e60cc796cc..ba5bdbcdc6e 100644 --- a/tests/helpers/test_script.py +++ b/tests/helpers/test_script.py @@ -21,7 +21,7 @@ class TestScriptHelper(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() # pylint: disable=invalid-name diff --git a/tests/helpers/test_service.py b/tests/helpers/test_service.py index 79054726c03..529804bd307 100644 --- a/tests/helpers/test_service.py +++ b/tests/helpers/test_service.py @@ -19,7 +19,7 @@ class TestServiceHelpers(unittest.TestCase): """Test the Home Assistant service helpers.""" 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() self.calls = mock_service(self.hass, 'test_domain', 'test_service') diff --git a/tests/helpers/test_sun.py b/tests/helpers/test_sun.py index 2cfe28e5178..b1c7f62e776 100644 --- a/tests/helpers/test_sun.py +++ b/tests/helpers/test_sun.py @@ -15,7 +15,7 @@ class TestSun(unittest.TestCase): """Test the sun helpers.""" 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() def tearDown(self): diff --git a/tests/helpers/test_temperature.py b/tests/helpers/test_temperature.py index 96e7bd6c74f..e2366d8866a 100644 --- a/tests/helpers/test_temperature.py +++ b/tests/helpers/test_temperature.py @@ -13,10 +13,10 @@ TEMP = 24.636626 class TestHelpersTemperature(unittest.TestCase): - """Setup the temperature tests.""" + """Set up the temperature tests.""" def setUp(self): - """Setup the tests.""" + """Set up the tests.""" self.hass = get_test_home_assistant() self.hass.config.unit_system = METRIC_SYSTEM diff --git a/tests/helpers/test_template.py b/tests/helpers/test_template.py index 2dfcb2a58e5..37614f9ee45 100644 --- a/tests/helpers/test_template.py +++ b/tests/helpers/test_template.py @@ -27,7 +27,7 @@ class TestHelpersTemplate(unittest.TestCase): # pylint: disable=invalid-name def setUp(self): - """Setup the tests.""" + """Set up the tests.""" self.hass = get_test_home_assistant() self.hass.config.units = UnitSystem('custom', TEMP_CELSIUS, LENGTH_METERS, VOLUME_LITERS, diff --git a/tests/test_config_entries.py b/tests/test_config_entries.py index 1f6fd8756e6..d8756d87a19 100644 --- a/tests/test_config_entries.py +++ b/tests/test_config_entries.py @@ -231,7 +231,7 @@ async def test_forward_entry_sets_up_component(hass): async def test_forward_entry_does_not_setup_entry_if_setup_fails(hass): - """Test we do not setup entry if component setup fails.""" + """Test we do not set up entry if component setup fails.""" entry = MockConfigEntry(domain='original') mock_setup = MagicMock(return_value=mock_coro(False)) diff --git a/tests/test_core.py b/tests/test_core.py index f23bed6bc8a..ce066135709 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -130,7 +130,7 @@ class TestHomeAssistant(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() # pylint: disable=invalid-name @@ -291,7 +291,7 @@ class TestEventBus(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.bus = self.hass.bus @@ -495,7 +495,7 @@ class TestStateMachine(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.states = self.hass.states self.states.set("light.Bowl", "on") @@ -620,7 +620,7 @@ class TestServiceRegistry(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.services = self.hass.services @@ -775,7 +775,7 @@ class TestConfig(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.config = ha.Config() self.assertIsNone(self.config.config_dir) diff --git a/tests/test_loader.py b/tests/test_loader.py index d87201fb61b..4beb7db570e 100644 --- a/tests/test_loader.py +++ b/tests/test_loader.py @@ -17,7 +17,7 @@ class TestLoader(unittest.TestCase): # pylint: disable=invalid-name def setUp(self): - """Setup tests.""" + """Set up tests.""" self.hass = get_test_home_assistant() # pylint: disable=invalid-name diff --git a/tests/test_requirements.py b/tests/test_requirements.py index 8ae0f6c11de..e3ef797df4d 100644 --- a/tests/test_requirements.py +++ b/tests/test_requirements.py @@ -16,7 +16,7 @@ class TestRequirements: # pylint: disable=invalid-name, no-self-use def setup_method(self, method): - """Setup the test.""" + """Set up the test.""" self.hass = get_test_home_assistant() def teardown_method(self, method): diff --git a/tests/test_setup.py b/tests/test_setup.py index 6f0c282e016..1ced1206f65 100644 --- a/tests/test_setup.py +++ b/tests/test_setup.py @@ -34,7 +34,7 @@ class TestSetup: # pylint: disable=invalid-name, no-self-use def setup_method(self, method): - """Setup the test.""" + """Set up the test.""" self.hass = get_test_home_assistant() def teardown_method(self, method): @@ -179,7 +179,7 @@ class TestSetup: assert not setup.setup_component(self.hass, 'non_existing') def test_component_not_double_initialized(self): - """Test we do not setup a component twice.""" + """Test we do not set up a component twice.""" mock_setup = mock.MagicMock(return_value=True) loader.set_component( @@ -206,7 +206,7 @@ class TestSetup: assert 'comp' not in self.hass.config.components def test_component_not_setup_twice_if_loaded_during_other_setup(self): - """Test component setup while waiting for lock is not setup twice.""" + """Test component setup while waiting for lock is not set up twice.""" result = [] @asyncio.coroutine @@ -219,7 +219,7 @@ class TestSetup: 'comp', MockModule('comp', async_setup=async_setup)) def setup_component(): - """Setup the component.""" + """Set up the component.""" setup.setup_component(self.hass, 'comp') thread = threading.Thread(target=setup_component) @@ -231,7 +231,7 @@ class TestSetup: assert len(result) == 1 def test_component_not_setup_missing_dependencies(self): - """Test we do not setup a component if not all dependencies loaded.""" + """Test we do not set up a component if not all dependencies loaded.""" deps = ['non_existing'] loader.set_component( self.hass, 'comp', MockModule('comp', dependencies=deps)) @@ -377,7 +377,7 @@ class TestSetup: call_order = [] def component1_setup(hass, config): - """Setup mock component.""" + """Set up mock component.""" discovery.discover(hass, 'test_component2', component='test_component2') discovery.discover(hass, 'test_component3', @@ -385,7 +385,7 @@ class TestSetup: return True def component_track_setup(hass, config): - """Setup mock component.""" + """Set up mock component.""" call_order.append(1) return True diff --git a/tests/util/test_dt.py b/tests/util/test_dt.py index feee69ad3c8..d670917c055 100644 --- a/tests/util/test_dt.py +++ b/tests/util/test_dt.py @@ -11,7 +11,7 @@ class TestDateUtil(unittest.TestCase): """Test util date methods.""" def setUp(self): - """Setup the tests.""" + """Set up the tests.""" self.orig_default_time_zone = dt_util.DEFAULT_TIME_ZONE def tearDown(self):