diff --git a/tests/components/portainer/test_button.py b/tests/components/portainer/test_button.py index 8f99e2faa208..bd9a0cbe1495 100644 --- a/tests/components/portainer/test_button.py +++ b/tests/components/portainer/test_button.py @@ -57,11 +57,7 @@ async def test_buttons( client_method: str, ) -> None: """Test pressing a Portainer container action button triggers client call. Click, click!""" - with patch( - "homeassistant.components.portainer._PLATFORMS", - [Platform.BUTTON], - ): - await setup_integration(hass, mock_config_entry) + await setup_integration(hass, mock_config_entry) entity_id = f"button.practical_morse_{action}_container" method_mock = getattr(mock_portainer_client, client_method) @@ -93,11 +89,7 @@ async def test_buttons_exceptions( client_method: str, ) -> None: """Test that Portainer buttons, but this time when they will do boom for sure.""" - with patch( - "homeassistant.components.portainer._PLATFORMS", - [Platform.BUTTON], - ): - await setup_integration(hass, mock_config_entry) + await setup_integration(hass, mock_config_entry) action = client_method.split("_")[0] entity_id = f"button.practical_morse_{action}_container" diff --git a/tests/components/portainer/test_switch.py b/tests/components/portainer/test_switch.py index c738c1a264ff..2f917e56e8df 100644 --- a/tests/components/portainer/test_switch.py +++ b/tests/components/portainer/test_switch.py @@ -60,11 +60,7 @@ async def test_turn_off_on( client_method: str, ) -> None: """Test the switches. Have you tried to turn it off and on again?""" - with patch( - "homeassistant.components.portainer._PLATFORMS", - [Platform.SWITCH], - ): - await setup_integration(hass, mock_config_entry) + await setup_integration(hass, mock_config_entry) entity_id = "switch.practical_morse_container" method_mock = getattr(mock_portainer_client, client_method) @@ -107,11 +103,7 @@ async def test_turn_off_on_exceptions( expected_exception: Exception, ) -> None: """Test the switches. Have you tried to turn it off and on again? This time they will do boom!""" - with patch( - "homeassistant.components.portainer._PLATFORMS", - [Platform.SWITCH], - ): - await setup_integration(hass, mock_config_entry) + await setup_integration(hass, mock_config_entry) entity_id = "switch.practical_morse_container" method_mock = getattr(mock_portainer_client, client_method)