mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Fix dangerous-default-value warnings in nzbget tests (#119580)
This commit is contained in:
parent
ed52ff3076
commit
a80a372c1c
@ -59,14 +59,9 @@ MOCK_HISTORY = [
|
||||
]
|
||||
|
||||
|
||||
async def init_integration(
|
||||
hass,
|
||||
*,
|
||||
data: dict = ENTRY_CONFIG,
|
||||
options: dict = ENTRY_OPTIONS,
|
||||
) -> MockConfigEntry:
|
||||
async def init_integration(hass) -> MockConfigEntry:
|
||||
"""Set up the NZBGet integration in Home Assistant."""
|
||||
entry = MockConfigEntry(domain=DOMAIN, data=data, options=options)
|
||||
entry = MockConfigEntry(domain=DOMAIN, data=ENTRY_CONFIG, options=ENTRY_OPTIONS)
|
||||
entry.add_to_hass(hass)
|
||||
|
||||
await hass.config_entries.async_setup(entry.entry_id)
|
||||
@ -82,17 +77,17 @@ def _patch_async_setup_entry(return_value=True):
|
||||
)
|
||||
|
||||
|
||||
def _patch_history(return_value=MOCK_HISTORY):
|
||||
def _patch_history():
|
||||
return patch(
|
||||
"homeassistant.components.nzbget.coordinator.NZBGetAPI.history",
|
||||
return_value=return_value,
|
||||
return_value=MOCK_HISTORY,
|
||||
)
|
||||
|
||||
|
||||
def _patch_status(return_value=MOCK_STATUS):
|
||||
def _patch_status():
|
||||
return patch(
|
||||
"homeassistant.components.nzbget.coordinator.NZBGetAPI.status",
|
||||
return_value=return_value,
|
||||
return_value=MOCK_STATUS,
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user