Skip to content

Commit 99333b0

Browse files
Tidy
1 parent eebd91c commit 99333b0

File tree

3 files changed

+2
-29
lines changed

3 files changed

+2
-29
lines changed

tests/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
"""Tests for label_state integration."""
22

33
import pytest
4-
5-
pytestmark = pytest.mark.asyncio
6-
74
from homeassistant.core import HomeAssistant
85
from pytest_homeassistant_custom_component.common import MockConfigEntry
96

7+
pytestmark = pytest.mark.asyncio
8+
109

1110
async def setup_integration(hass: HomeAssistant, config_entry: MockConfigEntry) -> None:
1211
"""Fixture for setting up the component."""

tests/conftest.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
from custom_components.label_state.const import DOMAIN
2020

21-
from .test_binary_sensor import VALUES_NUMERIC
22-
2321
pytest_plugins = "pytest_homeassistant_custom_component"
2422

2523

@@ -72,11 +70,4 @@ async def load_integration(
7270
await hass.config_entries.async_setup(config_entry.entry_id)
7371
await hass.async_block_till_done()
7472

75-
for value in VALUES_NUMERIC:
76-
hass.states.async_set(
77-
"sensor.test_monitored",
78-
str(value),
79-
)
80-
await hass.async_block_till_done()
81-
8273
return config_entry

tests/test_binary_sensor.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
"""The test for the label_state binary sensor platform."""
22

33
import pytest
4-
from homeassistant.const import (
5-
CONF_ENTITY_ID,
6-
CONF_NAME,
7-
CONF_PLATFORM,
8-
CONF_UNIQUE_ID,
9-
EVENT_HOMEASSISTANT_STARTED,
10-
STATE_ON,
11-
)
124
from homeassistant.core import HomeAssistant
135
from homeassistant.helpers import entity_registry as er
146
from homeassistant.helpers import label_registry as lr
@@ -17,15 +9,6 @@
179

1810
from . import setup_integration
1911

20-
VALUES_STATE1 = ["on", "off", "unavailable"]
21-
VALUES_STATE2 = ["on", "off", "unavailable"]
22-
VALUES_NUMERIC = [17, 20, 15.2, 5, 3.8, 9.2, 6.7, 14, 6]
23-
VALUES_ERROR = [17, "string", 15.3]
24-
COUNT = len(VALUES_NUMERIC)
25-
MIN_VALUE = min(VALUES_NUMERIC)
26-
MAX_VALUE = max(VALUES_NUMERIC)
27-
LAST_VALUE = VALUES_NUMERIC[-1]
28-
2912

3013
@pytest.mark.parametrize(
3114
(

0 commit comments

Comments
 (0)