Tests should all use test HA
This commit is contained in:
parent
bade0e0d71
commit
09ab3e95c0
52 changed files with 170 additions and 125 deletions
|
@ -7,13 +7,13 @@ Tests manual alarm control panel component.
|
|||
import unittest
|
||||
from unittest.mock import patch
|
||||
|
||||
import homeassistant.core as ha
|
||||
from homeassistant.const import (
|
||||
STATE_ALARM_DISARMED, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_AWAY,
|
||||
STATE_ALARM_PENDING, STATE_ALARM_TRIGGERED, STATE_UNKNOWN)
|
||||
from homeassistant.components import alarm_control_panel
|
||||
|
||||
from tests.common import mock_mqtt_component, fire_mqtt_message
|
||||
from tests.common import (
|
||||
mock_mqtt_component, fire_mqtt_message, get_test_home_assistant)
|
||||
|
||||
CODE = 'HELLO_CODE'
|
||||
|
||||
|
@ -22,7 +22,7 @@ class TestAlarmControlPanelMQTT(unittest.TestCase):
|
|||
""" Test the manual alarm module. """
|
||||
|
||||
def setUp(self): # pylint: disable=invalid-name
|
||||
self.hass = ha.HomeAssistant()
|
||||
self.hass = get_test_home_assistant()
|
||||
self.mock_publish = mock_mqtt_component(self.hass)
|
||||
|
||||
def tearDown(self): # pylint: disable=invalid-name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue