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:
Chris Talkington
2020-08-22 18:31:53 -05:00
committed by GitHub
parent 3198233b8f
commit dfa18b4b6a

View File

@@ -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: [],