Fix pointless-exception-statement warning in tests (#119402)
parent
5531e54745
commit
7384140a60
|
@ -600,7 +600,7 @@ def mock_state_change_event(
|
|||
def mock_component(hass: HomeAssistant, component: str) -> None:
|
||||
"""Mock a component is setup."""
|
||||
if component in hass.config.components:
|
||||
AssertionError(f"Integration {component} is already setup")
|
||||
raise AssertionError(f"Integration {component} is already setup")
|
||||
|
||||
hass.config.components.add(component)
|
||||
|
||||
|
|
Loading…
Reference in New Issue