mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add manufacturer and model to bluetooth adapter device (#82769)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
@@ -130,7 +130,10 @@ async def test_async_step_integration_discovery(hass):
|
||||
"""Test setting up from integration discovery."""
|
||||
|
||||
details = AdapterDetails(
|
||||
address="00:00:00:00:00:01", sw_version="1.23.5", hw_version="1.2.3"
|
||||
address="00:00:00:00:00:01",
|
||||
sw_version="1.23.5",
|
||||
hw_version="1.2.3",
|
||||
manufacturer="ACME",
|
||||
)
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
@@ -159,7 +162,10 @@ async def test_async_step_integration_discovery_during_onboarding_one_adapter(
|
||||
):
|
||||
"""Test setting up from integration discovery during onboarding."""
|
||||
details = AdapterDetails(
|
||||
address="00:00:00:00:00:01", sw_version="1.23.5", hw_version="1.2.3"
|
||||
address="00:00:00:00:00:01",
|
||||
sw_version="1.23.5",
|
||||
hw_version="1.2.3",
|
||||
manufacturer="ACME",
|
||||
)
|
||||
|
||||
with patch(
|
||||
@@ -187,10 +193,16 @@ async def test_async_step_integration_discovery_during_onboarding_two_adapters(
|
||||
):
|
||||
"""Test setting up from integration discovery during onboarding."""
|
||||
details1 = AdapterDetails(
|
||||
address="00:00:00:00:00:01", sw_version="1.23.5", hw_version="1.2.3"
|
||||
address="00:00:00:00:00:01",
|
||||
sw_version="1.23.5",
|
||||
hw_version="1.2.3",
|
||||
manufacturer="ACME",
|
||||
)
|
||||
details2 = AdapterDetails(
|
||||
address="00:00:00:00:00:02", sw_version="1.23.5", hw_version="1.2.3"
|
||||
address="00:00:00:00:00:02",
|
||||
sw_version="1.23.5",
|
||||
hw_version="1.2.3",
|
||||
manufacturer="ACME",
|
||||
)
|
||||
|
||||
with patch(
|
||||
@@ -226,7 +238,10 @@ async def test_async_step_integration_discovery_during_onboarding_two_adapters(
|
||||
async def test_async_step_integration_discovery_during_onboarding(hass, macos_adapter):
|
||||
"""Test setting up from integration discovery during onboarding."""
|
||||
details = AdapterDetails(
|
||||
address=DEFAULT_ADDRESS, sw_version="1.23.5", hw_version="1.2.3"
|
||||
address=DEFAULT_ADDRESS,
|
||||
sw_version="1.23.5",
|
||||
hw_version="1.2.3",
|
||||
manufacturer="ACME",
|
||||
)
|
||||
|
||||
with patch(
|
||||
@@ -252,7 +267,10 @@ async def test_async_step_integration_discovery_during_onboarding(hass, macos_ad
|
||||
async def test_async_step_integration_discovery_already_exists(hass):
|
||||
"""Test setting up from integration discovery when an entry already exists."""
|
||||
details = AdapterDetails(
|
||||
address="00:00:00:00:00:01", sw_version="1.23.5", hw_version="1.2.3"
|
||||
address="00:00:00:00:00:01",
|
||||
sw_version="1.23.5",
|
||||
hw_version="1.2.3",
|
||||
manufacturer="ACME",
|
||||
)
|
||||
|
||||
entry = MockConfigEntry(domain=DOMAIN, unique_id="00:00:00:00:00:01")
|
||||
|
||||
Reference in New Issue
Block a user