Tests should all use test HA

This commit is contained in:
Paulus Schoutsen 2016-02-14 15:08:23 -08:00
parent bade0e0d71
commit 09ab3e95c0
52 changed files with 170 additions and 125 deletions

View file

@ -7,10 +7,11 @@ Tests the entity helper.
# pylint: disable=protected-access,too-many-public-methods
import unittest
import homeassistant.core as ha
import homeassistant.helpers.entity as entity
from homeassistant.const import ATTR_HIDDEN
from tests.common import get_test_home_assistant
class TestHelpersEntity(unittest.TestCase):
""" Tests homeassistant.helpers.entity module. """
@ -19,7 +20,7 @@ class TestHelpersEntity(unittest.TestCase):
""" Init needed objects. """
self.entity = entity.Entity()
self.entity.entity_id = 'test.overwrite_hidden_true'
self.hass = self.entity.hass = ha.HomeAssistant()
self.hass = self.entity.hass = get_test_home_assistant()
self.entity.update_ha_state()
def tearDown(self): # pylint: disable=invalid-name