Remove all empty *_setup_platform() from integrations (#31025)
* Remove all empty *_setup_platform() from integrations * Fix tests for smartthings * Fix tests for heos
This commit is contained in:
1 parent
41014d73be
commit
fb35d382e1
89 files changed
-451
No files matched your search
@@ -63,11 +63,6 @@ async def setup_platform(hass, config_entry, config):
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
||||
async def test_async_setup_platform():
|
||||
"""Test setup platform does nothing (it uses config entries)."""
|
||||
await media_player.async_setup_platform(None, None, None)
|
||||
|
||||
|
||||
async def test_state_attributes(hass, config_entry, config, controller):
|
||||
"""Tests the state attributes."""
|
||||
await setup_platform(hass, config_entry, config)
|
||||
|
||||
@@ -32,11 +32,6 @@ async def test_mapping_integrity():
|
||||
assert device_class in DEVICE_CLASSES, device_class
|
||||
|
||||
|
||||
async def test_async_setup_platform():
|
||||
"""Test setup platform does nothing (it uses config entries)."""
|
||||
await binary_sensor.async_setup_platform(None, None, None)
|
||||
|
||||
|
||||
async def test_entity_state(hass, device_factory):
|
||||
"""Tests the state attributes properly match the light types."""
|
||||
device = device_factory(
|
||||
|
||||
@@ -198,11 +198,6 @@ def air_conditioner_fixture(device_factory):
|
||||
return device
|
||||
|
||||
|
||||
async def test_async_setup_platform():
|
||||
"""Test setup platform does nothing (it uses config entries)."""
|
||||
await climate.async_setup_platform(None, None, None)
|
||||
|
||||
|
||||
async def test_legacy_thermostat_entity_state(hass, legacy_thermostat):
|
||||
"""Tests the state attributes properly match the thermostat type."""
|
||||
await setup_platform(hass, CLIMATE_DOMAIN, devices=[legacy_thermostat])
|
||||
|
||||
@@ -18,7 +18,6 @@ from homeassistant.components.cover import (
|
||||
STATE_OPEN,
|
||||
STATE_OPENING,
|
||||
)
|
||||
from homeassistant.components.smartthings import cover
|
||||
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
|
||||
from homeassistant.const import ATTR_BATTERY_LEVEL, ATTR_ENTITY_ID
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
@@ -26,11 +25,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
from .conftest import setup_platform
|
||||
|
||||
|
||||
async def test_async_setup_platform():
|
||||
"""Test setup platform does nothing (it uses config entries)."""
|
||||
await cover.async_setup_platform(None, None, None)
|
||||
|
||||
|
||||
async def test_entity_and_device_attributes(hass, device_factory):
|
||||
"""Test the attributes of the entity are correct."""
|
||||
# Arrange
|
||||
|
||||
@@ -16,7 +16,6 @@ from homeassistant.components.fan import (
|
||||
SPEED_OFF,
|
||||
SUPPORT_SET_SPEED,
|
||||
)
|
||||
from homeassistant.components.smartthings import fan
|
||||
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
|
||||
from homeassistant.const import ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
@@ -24,11 +23,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
from .conftest import setup_platform
|
||||
|
||||
|
||||
async def test_async_setup_platform():
|
||||
"""Test setup platform does nothing (it uses config entries)."""
|
||||
await fan.async_setup_platform(None, None, None)
|
||||
|
||||
|
||||
async def test_entity_state(hass, device_factory):
|
||||
"""Tests the state attributes properly match the fan types."""
|
||||
device = device_factory(
|
||||
|
||||
@@ -18,7 +18,6 @@ from homeassistant.components.light import (
|
||||
SUPPORT_COLOR_TEMP,
|
||||
SUPPORT_TRANSITION,
|
||||
)
|
||||
from homeassistant.components.smartthings import light
|
||||
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
|
||||
from homeassistant.const import ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
@@ -68,11 +67,6 @@ def light_devices_fixture(device_factory):
|
||||
]
|
||||
|
||||
|
||||
async def test_async_setup_platform():
|
||||
"""Test setup platform does nothing (it uses config entries)."""
|
||||
await light.async_setup_platform(None, None, None)
|
||||
|
||||
|
||||
async def test_entity_state(hass, light_devices):
|
||||
"""Tests the state attributes properly match the light types."""
|
||||
await setup_platform(hass, LIGHT_DOMAIN, devices=light_devices)
|
||||
|
||||
@@ -8,18 +8,12 @@ from pysmartthings import Attribute, Capability
|
||||
from pysmartthings.device import Status
|
||||
|
||||
from homeassistant.components.lock import DOMAIN as LOCK_DOMAIN
|
||||
from homeassistant.components.smartthings import lock
|
||||
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
|
||||
from .conftest import setup_platform
|
||||
|
||||
|
||||
async def test_async_setup_platform():
|
||||
"""Test setup platform does nothing (it uses config entries)."""
|
||||
await lock.async_setup_platform(None, None, None)
|
||||
|
||||
|
||||
async def test_entity_and_device_attributes(hass, device_factory):
|
||||
"""Test the attributes of the entity are correct."""
|
||||
# Arrange
|
||||
|
||||
@@ -5,17 +5,11 @@ The only mocking required is of the underlying SmartThings API object so
|
||||
real HTTP calls are not initiated during testing.
|
||||
"""
|
||||
from homeassistant.components.scene import DOMAIN as SCENE_DOMAIN
|
||||
from homeassistant.components.smartthings import scene as scene_platform
|
||||
from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_ON
|
||||
|
||||
from .conftest import setup_platform
|
||||
|
||||
|
||||
async def test_async_setup_platform():
|
||||
"""Test setup platform does nothing (it uses config entries)."""
|
||||
await scene_platform.async_setup_platform(None, None, None)
|
||||
|
||||
|
||||
async def test_entity_and_device_attributes(hass, scene):
|
||||
"""Test the attributes of the entity are correct."""
|
||||
# Arrange
|
||||
|
||||
@@ -31,11 +31,6 @@ async def test_mapping_integrity():
|
||||
), sensor_map.device_class
|
||||
|
||||
|
||||
async def test_async_setup_platform():
|
||||
"""Test setup platform does nothing (it uses config entries)."""
|
||||
await sensor.async_setup_platform(None, None, None)
|
||||
|
||||
|
||||
async def test_entity_state(hass, device_factory):
|
||||
"""Tests the state attributes properly match the sensor types."""
|
||||
device = device_factory("Sensor 1", [Capability.battery], {Attribute.battery: 100})
|
||||
|
||||
@@ -6,7 +6,6 @@ real HTTP calls are not initiated during testing.
|
||||
"""
|
||||
from pysmartthings import Attribute, Capability
|
||||
|
||||
from homeassistant.components.smartthings import switch
|
||||
from homeassistant.components.smartthings.const import DOMAIN, SIGNAL_SMARTTHINGS_UPDATE
|
||||
from homeassistant.components.switch import (
|
||||
ATTR_CURRENT_POWER_W,
|
||||
@@ -18,11 +17,6 @@ from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
from .conftest import setup_platform
|
||||
|
||||
|
||||
async def test_async_setup_platform():
|
||||
"""Test setup platform does nothing (it uses config entries)."""
|
||||
await switch.async_setup_platform(None, None, None)
|
||||
|
||||
|
||||
async def test_entity_and_device_attributes(hass, device_factory):
|
||||
"""Test the attributes of the entity are correct."""
|
||||
# Arrange
|
||||
|
||||
Reference in new issue
Block a user