Fix dangerous-default-value warnings in switchbot tests (#119575)

This commit is contained in:
epenet 2024-06-13 09:20:53 +02:00 committed by GitHub
parent 08403df20e
commit a06f098312
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,19 +36,13 @@ def patch_async_setup_entry(return_value=True):
) )
async def init_integration( async def init_integration(hass: HomeAssistant) -> MockConfigEntry:
hass: HomeAssistant,
*,
data: dict = ENTRY_CONFIG,
skip_entry_setup: bool = False,
) -> MockConfigEntry:
"""Set up the Switchbot integration in Home Assistant.""" """Set up the Switchbot integration in Home Assistant."""
entry = MockConfigEntry(domain=DOMAIN, data=data) entry = MockConfigEntry(domain=DOMAIN, data=ENTRY_CONFIG)
entry.add_to_hass(hass) entry.add_to_hass(hass)
if not skip_entry_setup: await hass.config_entries.async_setup(entry.entry_id)
await hass.config_entries.async_setup(entry.entry_id) await hass.async_block_till_done()
await hass.async_block_till_done()
return entry return entry