Move imports to top for mochad (#29514)
* Move imports to top for mochad * Fix test test_light.py for mochad * Fix test test_switch.py for mochad * Make intra package imports relative in switch and light
This commit is contained in:
parent
9ba9b3339b
commit
3b6bc9067f
5 changed files with 35 additions and 34 deletions
|
@ -14,8 +14,8 @@ from tests.common import get_test_home_assistant
|
|||
@pytest.fixture(autouse=True)
|
||||
def pymochad_mock():
|
||||
"""Mock pymochad."""
|
||||
with mock.patch.dict("sys.modules", {"pymochad": mock.MagicMock()}):
|
||||
yield
|
||||
with mock.patch("homeassistant.components.mochad.light.device") as device:
|
||||
yield device
|
||||
|
||||
|
||||
class TestMochadSwitchSetup(unittest.TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue