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
1 changed files with 6 additions and 2 deletions
|
@ -16,7 +16,9 @@ from tests.common import MockConfigEntry
|
|||
@pytest.fixture
|
||||
def mock_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"
|
||||
yield mock
|
||||
|
||||
|
@ -24,7 +26,9 @@ def mock_login():
|
|||
@pytest.fixture
|
||||
def mock_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 = {
|
||||
pymelcloud.DEVICE_TYPE_ATA: [],
|
||||
pymelcloud.DEVICE_TYPE_ATW: [],
|
||||
|
|
Loading…
Add table
Reference in a new issue