Use Platform constant in tests (#145801)

* Use Platform constant in tests

* spelling

* Fix platform
This commit is contained in:
epenet authored and GitHub committed 2025-05-28 15:51:37 +02:00
1 parent 1889f0ef66
commit c3ade400fb
30 files changed
+107 -57

No files matched your search

+3 -3
View File
@@ -7,7 +7,7 @@ import pytest
from homeassistant.components import binary_sensor
from homeassistant.config_entries import ConfigEntry, ConfigFlow
from homeassistant.const import STATE_OFF, STATE_ON, EntityCategory
from homeassistant.const import STATE_OFF, STATE_ON, EntityCategory, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
@@ -62,7 +62,7 @@ async def test_name(hass: HomeAssistant) -> None:
) -> bool:
"""Set up test config entry."""
await hass.config_entries.async_forward_entry_setups(
config_entry, [binary_sensor.DOMAIN]
config_entry, [Platform.BINARY_SENSOR]
)
return True
@@ -142,7 +142,7 @@ async def test_entity_category_config_raises_error(
) -> bool:
"""Set up test config entry."""
await hass.config_entries.async_forward_entry_setups(
config_entry, [binary_sensor.DOMAIN]
config_entry, [Platform.BINARY_SENSOR]
)
return True