Fix litejet tests

pull/29495/head
Paulus Schoutsen 2019-12-04 21:47:35 -08:00
parent 52926f1961
commit 41440d4f1b
4 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ def get_switch_name(number):
@pytest.fixture
def mock_lj(hass):
"""Initialize components."""
with mock.patch("pylitejet.LiteJet") as mock_pylitejet:
with mock.patch("homeassistant.components.litejet.LiteJet") as mock_pylitejet:
mock_lj = mock_pylitejet.return_value
mock_lj.switch_pressed_callbacks = {}

View File

@ -21,7 +21,7 @@ ENTITY_OTHER_LIGHT_NUMBER = 2
class TestLiteJetLight(unittest.TestCase):
"""Test the litejet component."""
@mock.patch("pylitejet.LiteJet")
@mock.patch("homeassistant.components.litejet.LiteJet")
def setup_method(self, method, mock_pylitejet):
"""Set up things to be run when tests are started."""
self.hass = get_test_home_assistant()

View File

@ -20,7 +20,7 @@ ENTITY_OTHER_SCENE_NUMBER = 2
class TestLiteJetScene(unittest.TestCase):
"""Test the litejet component."""
@mock.patch("pylitejet.LiteJet")
@mock.patch("homeassistant.components.litejet.LiteJet")
def setup_method(self, method, mock_pylitejet):
"""Set up things to be run when tests are started."""
self.hass = get_test_home_assistant()

View File

@ -21,7 +21,7 @@ ENTITY_OTHER_SWITCH_NUMBER = 2
class TestLiteJetSwitch(unittest.TestCase):
"""Test the litejet component."""
@mock.patch("pylitejet.LiteJet")
@mock.patch("homeassistant.components.litejet.LiteJet")
def setup_method(self, method, mock_pylitejet):
"""Set up things to be run when tests are started."""
self.hass = get_test_home_assistant()