Fix HEOS discovery could result in multiple config entries (#22903)

* Prevent duplicate entries from discovery

* Update reqs files

* Prevent duplicate entries from discovery
This commit is contained in:
Andrew Sayre 2019-04-08 21:24:40 -05:00 committed by GitHub
parent d577955d1e
commit 38f063a158
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 68 additions and 29 deletions

View file

@ -103,3 +103,21 @@ def input_sources_fixture() -> Sequence[InputSource]:
def dispatcher_fixture() -> Dispatcher:
"""Create a dispatcher for testing."""
return Dispatcher()
@pytest.fixture(name="discovery_data")
def discovery_data_fixture() -> dict:
"""Return mock discovery data for testing."""
return {
'host': '127.0.0.1',
'manufacturer': 'Denon',
'model_name': 'HEOS Drive',
'model_number': 'DWSA-10 4.0',
'name': 'Office',
'port': 60006,
'serial': None,
'ssdp_description':
'http://127.0.0.1:60006/upnp/desc/aios_device/aios_device.xml',
'udn': 'uuid:e61de70c-2250-1c22-0080-0005cdf512be',
'upnp_device_type': 'urn:schemas-denon-com:device:AiosDevice:1'
}