mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix pointless-exception-statement warning in tests (#119402)
This commit is contained in:
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…
x
Reference in New Issue
Block a user