Use the shared Zeroconf instance in esphome (#38747)
This commit is contained in:
1 parent
7f7a0003c7
commit
9b23d7c2fd
6 files changed
+30
-7
No files matched your search
@@ -22,11 +22,12 @@ def mock_client():
|
||||
"""Mock APIClient."""
|
||||
with patch("homeassistant.components.esphome.config_flow.APIClient") as mock_client:
|
||||
|
||||
def mock_constructor(loop, host, port, password):
|
||||
def mock_constructor(loop, host, port, password, zeroconf_instance=None):
|
||||
"""Fake the client constructor."""
|
||||
mock_client.host = host
|
||||
mock_client.port = port
|
||||
mock_client.password = password
|
||||
mock_client.zeroconf_instance = zeroconf_instance
|
||||
return mock_client
|
||||
|
||||
mock_client.side_effect = mock_constructor
|
||||
|
||||
Reference in new issue
Block a user