mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
Fix litejet tests
This commit is contained in:
parent
52926f1961
commit
41440d4f1b
@ -33,7 +33,7 @@ def get_switch_name(number):
|
|||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_lj(hass):
|
def mock_lj(hass):
|
||||||
"""Initialize components."""
|
"""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 = mock_pylitejet.return_value
|
||||||
|
|
||||||
mock_lj.switch_pressed_callbacks = {}
|
mock_lj.switch_pressed_callbacks = {}
|
||||||
|
@ -21,7 +21,7 @@ ENTITY_OTHER_LIGHT_NUMBER = 2
|
|||||||
class TestLiteJetLight(unittest.TestCase):
|
class TestLiteJetLight(unittest.TestCase):
|
||||||
"""Test the litejet component."""
|
"""Test the litejet component."""
|
||||||
|
|
||||||
@mock.patch("pylitejet.LiteJet")
|
@mock.patch("homeassistant.components.litejet.LiteJet")
|
||||||
def setup_method(self, method, mock_pylitejet):
|
def setup_method(self, method, mock_pylitejet):
|
||||||
"""Set up things to be run when tests are started."""
|
"""Set up things to be run when tests are started."""
|
||||||
self.hass = get_test_home_assistant()
|
self.hass = get_test_home_assistant()
|
||||||
|
@ -20,7 +20,7 @@ ENTITY_OTHER_SCENE_NUMBER = 2
|
|||||||
class TestLiteJetScene(unittest.TestCase):
|
class TestLiteJetScene(unittest.TestCase):
|
||||||
"""Test the litejet component."""
|
"""Test the litejet component."""
|
||||||
|
|
||||||
@mock.patch("pylitejet.LiteJet")
|
@mock.patch("homeassistant.components.litejet.LiteJet")
|
||||||
def setup_method(self, method, mock_pylitejet):
|
def setup_method(self, method, mock_pylitejet):
|
||||||
"""Set up things to be run when tests are started."""
|
"""Set up things to be run when tests are started."""
|
||||||
self.hass = get_test_home_assistant()
|
self.hass = get_test_home_assistant()
|
||||||
|
@ -21,7 +21,7 @@ ENTITY_OTHER_SWITCH_NUMBER = 2
|
|||||||
class TestLiteJetSwitch(unittest.TestCase):
|
class TestLiteJetSwitch(unittest.TestCase):
|
||||||
"""Test the litejet component."""
|
"""Test the litejet component."""
|
||||||
|
|
||||||
@mock.patch("pylitejet.LiteJet")
|
@mock.patch("homeassistant.components.litejet.LiteJet")
|
||||||
def setup_method(self, method, mock_pylitejet):
|
def setup_method(self, method, mock_pylitejet):
|
||||||
"""Set up things to be run when tests are started."""
|
"""Set up things to be run when tests are started."""
|
||||||
self.hass = get_test_home_assistant()
|
self.hass = get_test_home_assistant()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user