UniFi - Try to discover local controller (#31326)
* Its working * Use "unifi" as default host if a controller can be found * Fix tests * Make a fixture of patching the discovery function
This commit is contained in:
1 parent
56657fa859
commit
a8374cf423
3 files changed
+37
-2
No files matched your search
@@ -0,0 +1,13 @@
|
||||
"""Fixtures for UniFi methods."""
|
||||
from asynctest import patch
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_discovery():
|
||||
"""No real network traffic allowed."""
|
||||
with patch(
|
||||
"homeassistant.components.unifi.config_flow.async_discover_unifi",
|
||||
return_value=None,
|
||||
) as mock:
|
||||
yield mock
|
||||
Reference in new issue
Block a user