Update netdisco (#7563)
This commit is contained in:
1 parent
ed0ec613c3
commit
f0ce6c8210
5 files changed
+13
-7
No files matched your search
@@ -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