Use enums in samsungtv tests (#62195)

* Use enums in samsungtv tests

* uno mas
pull/62219/head
Robert Hillis 2021-12-17 10:26:53 -05:00 committed by GitHub
parent 5e0eb0eb4d
commit 3bd1f00b76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ from samsungctl import exceptions
from samsungtvws.exceptions import ConnectionFailure from samsungtvws.exceptions import ConnectionFailure
from websocket import WebSocketException from websocket import WebSocketException
from homeassistant.components.media_player import DEVICE_CLASS_TV from homeassistant.components.media_player import MediaPlayerDeviceClass
from homeassistant.components.media_player.const import ( from homeassistant.components.media_player.const import (
ATTR_INPUT_SOURCE, ATTR_INPUT_SOURCE,
ATTR_MEDIA_CONTENT_ID, ATTR_MEDIA_CONTENT_ID,
@ -517,7 +517,7 @@ async def test_device_class(hass, remote):
"""Test for device_class property.""" """Test for device_class property."""
await setup_samsungtv(hass, MOCK_CONFIG) await setup_samsungtv(hass, MOCK_CONFIG)
state = hass.states.get(ENTITY_ID) state = hass.states.get(ENTITY_ID)
assert state.attributes[ATTR_DEVICE_CLASS] == DEVICE_CLASS_TV assert state.attributes[ATTR_DEVICE_CLASS] is MediaPlayerDeviceClass.TV.value
async def test_turn_off_websocket(hass, remotews): async def test_turn_off_websocket(hass, remotews):