Fix litejet tests
parent
52926f1961
commit
41440d4f1b
|
@ -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 = {}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue