Use shared zeroconf for discovery netdisco (#37237)

* Use shared zeroconf for netdisco

* Update netdisco

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
J. Nick KostonandPaulus Schoutsen authored and GitHub committed 2020-06-29 19:34:38 -05:00
1 parent 0f43476d03
commit fae47358b8
7 files changed
+17 -14

No files matched your search

+6 -6
View File
@@ -58,7 +58,7 @@ async def mock_discovery(hass, discoveries, config=BASE_CONFIG):
async def test_unknown_service(hass):
"""Test that unknown service is ignored."""
def discover(netdisco):
def discover(netdisco, zeroconf_instance):
"""Fake discovery."""
return [("this_service_will_never_be_supported", {"info": "some"})]
@@ -71,7 +71,7 @@ async def test_unknown_service(hass):
async def test_load_platform(hass):
"""Test load a platform."""
def discover(netdisco):
def discover(netdisco, zeroconf_instance):
"""Fake discovery."""
return [(SERVICE, SERVICE_INFO)]
@@ -87,7 +87,7 @@ async def test_load_platform(hass):
async def test_load_component(hass):
"""Test load a component."""
def discover(netdisco):
def discover(netdisco, zeroconf_instance):
"""Fake discovery."""
return [(SERVICE_NO_PLATFORM, SERVICE_INFO)]
@@ -107,7 +107,7 @@ async def test_load_component(hass):
async def test_ignore_service(hass):
"""Test ignore service."""
def discover(netdisco):
def discover(netdisco, zeroconf_instance):
"""Fake discovery."""
return [(SERVICE_NO_PLATFORM, SERVICE_INFO)]
@@ -120,7 +120,7 @@ async def test_ignore_service(hass):
async def test_discover_duplicates(hass):
"""Test load a component."""
def discover(netdisco):
def discover(netdisco, zeroconf_instance):
"""Fake discovery."""
return [
(SERVICE_NO_PLATFORM, SERVICE_INFO),
@@ -145,7 +145,7 @@ async def test_discover_config_flow(hass):
"""Test discovery triggering a config flow."""
discovery_info = {"hello": "world"}
def discover(netdisco):
def discover(netdisco, zeroconf_instance):
"""Fake discovery."""
return [("mock-service", discovery_info)]