hass-core/tests/components/unifi/conftest.py
Robert Svensson a8374cf423
UniFi - Try to discover local controller ()
* Its working

* Use "unifi" as default host if a controller can be found

* Fix tests

* Make a fixture of patching the discovery function
2020-01-30 23:06:43 +01:00

13 lines
325 B
Python

"""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