mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Fix unmocked calls in melcloud (#39170)
* fix unmocked calls in melcloud * Update test_config_flow.py * Update test_config_flow.py * Update test_config_flow.py
This commit is contained in:
parent
3198233b8f
commit
dfa18b4b6a
@ -16,7 +16,9 @@ from tests.common import MockConfigEntry
|
|||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_login():
|
def mock_login():
|
||||||
"""Mock pymelcloud login."""
|
"""Mock pymelcloud login."""
|
||||||
with patch("pymelcloud.login") as mock:
|
with patch(
|
||||||
|
"homeassistant.components.melcloud.config_flow.pymelcloud.login"
|
||||||
|
) as mock:
|
||||||
mock.return_value = "test-token"
|
mock.return_value = "test-token"
|
||||||
yield mock
|
yield mock
|
||||||
|
|
||||||
@ -24,7 +26,9 @@ def mock_login():
|
|||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_get_devices():
|
def mock_get_devices():
|
||||||
"""Mock pymelcloud get_devices."""
|
"""Mock pymelcloud get_devices."""
|
||||||
with patch("pymelcloud.get_devices") as mock:
|
with patch(
|
||||||
|
"homeassistant.components.melcloud.config_flow.pymelcloud.get_devices"
|
||||||
|
) as mock:
|
||||||
mock.return_value = {
|
mock.return_value = {
|
||||||
pymelcloud.DEVICE_TYPE_ATA: [],
|
pymelcloud.DEVICE_TYPE_ATA: [],
|
||||||
pymelcloud.DEVICE_TYPE_ATW: [],
|
pymelcloud.DEVICE_TYPE_ATW: [],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user