Add missing hass type in tests/*.py (#124048)
This commit is contained in:
@@ -213,7 +213,7 @@ async def test_setup_after_deps_all_present(hass: HomeAssistant) -> None:
|
||||
order = []
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
order.append(domain)
|
||||
return True
|
||||
|
||||
@@ -260,7 +260,7 @@ async def test_setup_after_deps_in_stage_1_ignored(hass: HomeAssistant) -> None:
|
||||
order = []
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
order.append(domain)
|
||||
return True
|
||||
|
||||
@@ -315,7 +315,7 @@ async def test_setup_after_deps_manifests_are_loaded_even_if_not_setup(
|
||||
order = []
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
order.append(domain)
|
||||
return True
|
||||
|
||||
@@ -392,7 +392,7 @@ async def test_setup_frontend_before_recorder(hass: HomeAssistant) -> None:
|
||||
order = []
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
order.append(domain)
|
||||
return True
|
||||
|
||||
@@ -471,7 +471,7 @@ async def test_setup_after_deps_via_platform(hass: HomeAssistant) -> None:
|
||||
after_dep_event = asyncio.Event()
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
if domain == "after_dep_of_platform_int":
|
||||
await after_dep_event.wait()
|
||||
|
||||
@@ -520,7 +520,7 @@ async def test_setup_after_deps_not_trigger_load(hass: HomeAssistant) -> None:
|
||||
order = []
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
order.append(domain)
|
||||
return True
|
||||
|
||||
@@ -559,7 +559,7 @@ async def test_setup_after_deps_not_present(hass: HomeAssistant) -> None:
|
||||
order = []
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
order.append(domain)
|
||||
return True
|
||||
|
||||
@@ -969,7 +969,7 @@ async def test_empty_integrations_list_is_only_sent_at_the_end_of_bootstrap(
|
||||
order = []
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
order.append(domain)
|
||||
await asyncio.sleep(0.05)
|
||||
|
||||
@@ -1029,7 +1029,7 @@ async def test_warning_logged_on_wrap_up_timeout(
|
||||
task: asyncio.Task | None = None
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
nonlocal task
|
||||
|
||||
async def _not_marked_background_task():
|
||||
@@ -1067,7 +1067,7 @@ async def test_tasks_logged_that_block_stage_1(
|
||||
"""Test we log tasks that delay stage 1 startup."""
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
async def _not_marked_background_task():
|
||||
await asyncio.sleep(0.2)
|
||||
|
||||
@@ -1110,7 +1110,7 @@ async def test_tasks_logged_that_block_stage_2(
|
||||
done_future = hass.loop.create_future()
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
async def _not_marked_background_task():
|
||||
await done_future
|
||||
|
||||
@@ -1452,7 +1452,7 @@ async def test_setup_does_base_platforms_first(hass: HomeAssistant) -> None:
|
||||
order = []
|
||||
|
||||
def gen_domain_setup(domain):
|
||||
async def async_setup(hass, config):
|
||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
order.append(domain)
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user