Fix MQTT coverage directives

This commit is contained in:
Paulus Schoutsen 2015-08-11 07:47:47 -07:00
parent 2a9616e88c
commit 27ca611689
2 changed files with 2 additions and 5 deletions

View File

@ -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

View File

@ -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))