From dd90fb15e15efdce23f116b88a34a301d28af46c Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 3 Jun 2024 17:16:48 +0200 Subject: [PATCH] Fix incorrect type hint in dremel_3d_printer tests (#118709) --- tests/components/dremel_3d_printer/test_binary_sensor.py | 8 +++----- tests/components/dremel_3d_printer/test_button.py | 5 ++--- tests/components/dremel_3d_printer/test_sensor.py | 5 ++--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/components/dremel_3d_printer/test_binary_sensor.py b/tests/components/dremel_3d_printer/test_binary_sensor.py index 6581b6ff13d..e430d93b585 100644 --- a/tests/components/dremel_3d_printer/test_binary_sensor.py +++ b/tests/components/dremel_3d_printer/test_binary_sensor.py @@ -1,6 +1,6 @@ """Binary sensor tests for the Dremel 3D Printer integration.""" -from unittest.mock import AsyncMock +import pytest from homeassistant.components.binary_sensor import BinarySensorDeviceClass from homeassistant.components.dremel_3d_printer.const import DOMAIN @@ -11,11 +11,9 @@ from homeassistant.setup import async_setup_component from tests.common import MockConfigEntry +@pytest.mark.usefixtures("connection", "entity_registry_enabled_by_default") async def test_binary_sensors( - hass: HomeAssistant, - connection, - config_entry: MockConfigEntry, - entity_registry_enabled_by_default: AsyncMock, + hass: HomeAssistant, config_entry: MockConfigEntry ) -> None: """Test we get binary sensor data.""" await hass.config_entries.async_setup(config_entry.entry_id) diff --git a/tests/components/dremel_3d_printer/test_button.py b/tests/components/dremel_3d_printer/test_button.py index 48b39b09cf1..d2d63bb6a25 100644 --- a/tests/components/dremel_3d_printer/test_button.py +++ b/tests/components/dremel_3d_printer/test_button.py @@ -1,6 +1,6 @@ """Button tests for the Dremel 3D Printer integration.""" -from unittest.mock import AsyncMock, patch +from unittest.mock import patch import pytest @@ -22,11 +22,10 @@ from tests.common import MockConfigEntry ("resume", "resume"), ], ) +@pytest.mark.usefixtures("connection", "entity_registry_enabled_by_default") async def test_buttons( hass: HomeAssistant, - connection: None, config_entry: MockConfigEntry, - entity_registry_enabled_by_default: AsyncMock, button: str, function: str, ) -> None: diff --git a/tests/components/dremel_3d_printer/test_sensor.py b/tests/components/dremel_3d_printer/test_sensor.py index c1e3a9bc14b..74a4fc32f09 100644 --- a/tests/components/dremel_3d_printer/test_sensor.py +++ b/tests/components/dremel_3d_printer/test_sensor.py @@ -1,9 +1,9 @@ """Sensor tests for the Dremel 3D Printer integration.""" from datetime import datetime -from unittest.mock import AsyncMock from freezegun.api import FrozenDateTimeFactory +import pytest from homeassistant.components.dremel_3d_printer.const import DOMAIN from homeassistant.components.sensor import ( @@ -26,11 +26,10 @@ from homeassistant.util.dt import UTC from tests.common import MockConfigEntry +@pytest.mark.usefixtures("connection", "entity_registry_enabled_by_default") async def test_sensors( hass: HomeAssistant, - connection, config_entry: MockConfigEntry, - entity_registry_enabled_by_default: AsyncMock, freezer: FrozenDateTimeFactory, ) -> None: """Test we get sensor data."""