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:
1 parent
9ba9b3339b
commit
3b6bc9067f
5 files changed
+35
-34
No files matched your search
@@ -14,9 +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(), "pymochad.exceptions": mock.MagicMock()},
|
||||
with mock.patch("homeassistant.components.mochad.switch.device"), mock.patch(
|
||||
"homeassistant.components.mochad.switch.MochadException"
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
Reference in new issue
Block a user