mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 15:31:52 -05:00
Update netdisco (#7563)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
"""The tests for the discovery component."""
|
||||
import asyncio
|
||||
import os
|
||||
from unittest.mock import patch, MagicMock
|
||||
|
||||
from unittest.mock import patch
|
||||
import pytest
|
||||
|
||||
from homeassistant.bootstrap import async_setup_component
|
||||
from homeassistant.components import discovery
|
||||
@@ -34,6 +35,15 @@ IGNORE_CONFIG = {
|
||||
}
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def netdisco_mock():
|
||||
"""Mock netdisco."""
|
||||
with patch.dict('sys.modules', {
|
||||
'netdisco.discovery': MagicMock(),
|
||||
}):
|
||||
yield
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
def mock_discovery(hass, discoveries, config=BASE_CONFIG):
|
||||
"""Helper to mock discoveries."""
|
||||
|
||||
Reference in New Issue
Block a user