Fix incorrect type hint in dremel_3d_printer tests (#118709)
This commit is contained in:
parent
99e02fe2b2
commit
dd90fb15e1
3 changed files with 7 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
||||||
"""Binary sensor tests for the Dremel 3D Printer integration."""
|
"""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.binary_sensor import BinarySensorDeviceClass
|
||||||
from homeassistant.components.dremel_3d_printer.const import DOMAIN
|
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
|
from tests.common import MockConfigEntry
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("connection", "entity_registry_enabled_by_default")
|
||||||
async def test_binary_sensors(
|
async def test_binary_sensors(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, config_entry: MockConfigEntry
|
||||||
connection,
|
|
||||||
config_entry: MockConfigEntry,
|
|
||||||
entity_registry_enabled_by_default: AsyncMock,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test we get binary sensor data."""
|
"""Test we get binary sensor data."""
|
||||||
await hass.config_entries.async_setup(config_entry.entry_id)
|
await hass.config_entries.async_setup(config_entry.entry_id)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""Button tests for the Dremel 3D Printer integration."""
|
"""Button tests for the Dremel 3D Printer integration."""
|
||||||
|
|
||||||
from unittest.mock import AsyncMock, patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
@ -22,11 +22,10 @@ from tests.common import MockConfigEntry
|
||||||
("resume", "resume"),
|
("resume", "resume"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@pytest.mark.usefixtures("connection", "entity_registry_enabled_by_default")
|
||||||
async def test_buttons(
|
async def test_buttons(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
connection: None,
|
|
||||||
config_entry: MockConfigEntry,
|
config_entry: MockConfigEntry,
|
||||||
entity_registry_enabled_by_default: AsyncMock,
|
|
||||||
button: str,
|
button: str,
|
||||||
function: str,
|
function: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
"""Sensor tests for the Dremel 3D Printer integration."""
|
"""Sensor tests for the Dremel 3D Printer integration."""
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from unittest.mock import AsyncMock
|
|
||||||
|
|
||||||
from freezegun.api import FrozenDateTimeFactory
|
from freezegun.api import FrozenDateTimeFactory
|
||||||
|
import pytest
|
||||||
|
|
||||||
from homeassistant.components.dremel_3d_printer.const import DOMAIN
|
from homeassistant.components.dremel_3d_printer.const import DOMAIN
|
||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
|
@ -26,11 +26,10 @@ from homeassistant.util.dt import UTC
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("connection", "entity_registry_enabled_by_default")
|
||||||
async def test_sensors(
|
async def test_sensors(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
connection,
|
|
||||||
config_entry: MockConfigEntry,
|
config_entry: MockConfigEntry,
|
||||||
entity_registry_enabled_by_default: AsyncMock,
|
|
||||||
freezer: FrozenDateTimeFactory,
|
freezer: FrozenDateTimeFactory,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test we get sensor data."""
|
"""Test we get sensor data."""
|
||||||
|
|
Loading…
Add table
Reference in a new issue