Move fixtures to decorators in core tests (#119675)
This commit is contained in:
parent
b80f7185b2
commit
01be5d5f6b
9 changed files with 80 additions and 109 deletions
|
@ -1177,19 +1177,17 @@ async def test_loading_component_loads_translations(hass: HomeAssistant) -> None
|
|||
assert translation.async_translations_loaded(hass, {"comp"}) is True
|
||||
|
||||
|
||||
async def test_importing_integration_in_executor(
|
||||
hass: HomeAssistant, enable_custom_integrations: None
|
||||
) -> None:
|
||||
@pytest.mark.usefixtures("enable_custom_integrations")
|
||||
async def test_importing_integration_in_executor(hass: HomeAssistant) -> None:
|
||||
"""Test we can import an integration in an executor."""
|
||||
assert await setup.async_setup_component(hass, "test_package_loaded_executor", {})
|
||||
assert await setup.async_setup_component(hass, "test_package_loaded_executor", {})
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("enable_custom_integrations")
|
||||
async def test_async_prepare_setup_platform(
|
||||
hass: HomeAssistant,
|
||||
enable_custom_integrations: None,
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test we can prepare a platform setup."""
|
||||
integration = await loader.async_get_integration(hass, "test")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue