mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Fix MQTT coverage directives
This commit is contained in:
parent
2a9616e88c
commit
27ca611689
@ -85,6 +85,3 @@ exclude_lines =
|
||||
# Don't complain if tests don't hit defensive assertion code:
|
||||
raise AssertionError
|
||||
raise NotImplementedError
|
||||
|
||||
# The MQTT client is mocked
|
||||
class MQTT
|
||||
|
@ -155,7 +155,7 @@ def setup(hass, config):
|
||||
# This is based on one of the paho-mqtt examples:
|
||||
# http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.python.git/tree/examples/sub-class.py
|
||||
# pylint: disable=too-many-arguments
|
||||
class MQTT(object):
|
||||
class MQTT(object): # pragma: no cover
|
||||
""" Implements messaging service for MQTT. """
|
||||
def __init__(self, hass, broker, port, client_id, keepalive, username,
|
||||
password):
|
||||
@ -237,7 +237,7 @@ class MQTT(object):
|
||||
})
|
||||
|
||||
|
||||
def _raise_on_error(result):
|
||||
def _raise_on_error(result): # pragma: no cover
|
||||
""" Raise error if error result. """
|
||||
if result != 0:
|
||||
raise HomeAssistantError('Error talking to MQTT: {}'.format(result))
|
||||
|
Loading…
x
Reference in New Issue
Block a user