Rename CoverDevice to CoverEntity (#34595)
This commit is contained in:
1 parent
6f7f5b4034
commit
8c5c963b96
53 files changed
+139
-116
No files matched your search
@@ -0,0 +1,12 @@
|
||||
"""The tests for Cover."""
|
||||
import homeassistant.components.cover as cover
|
||||
|
||||
|
||||
def test_deprecated_base_class(caplog):
|
||||
"""Test deprecated base class."""
|
||||
|
||||
class CustomCover(cover.CoverDevice):
|
||||
pass
|
||||
|
||||
CustomCover()
|
||||
assert "CoverDevice is deprecated, modify CustomCover" in caplog.text
|
||||
@@ -12,7 +12,7 @@ from homeassistant.components.cover import (
|
||||
SUPPORT_SET_TILT_POSITION,
|
||||
SUPPORT_STOP,
|
||||
SUPPORT_STOP_TILT,
|
||||
CoverDevice,
|
||||
CoverEntity,
|
||||
)
|
||||
|
||||
from tests.common import MockEntity
|
||||
@@ -65,7 +65,7 @@ async def async_setup_platform(
|
||||
async_add_entities_callback(ENTITIES)
|
||||
|
||||
|
||||
class MockCover(MockEntity, CoverDevice):
|
||||
class MockCover(MockEntity, CoverEntity):
|
||||
"""Mock Cover class."""
|
||||
|
||||
@property
|
||||
|
||||
Reference in new issue
Block a user