Correct device_class test for mqtt button (#101500)
This commit is contained in:
parent
da770df13f
commit
2bfb1e75d3
1 changed files with 5 additions and 2 deletions
|
@ -443,7 +443,7 @@ async def test_entity_debug_info_message(
|
|||
mqtt.DOMAIN: {
|
||||
button.DOMAIN: {
|
||||
"name": "test",
|
||||
"state_topic": "test-topic",
|
||||
"command_topic": "test-topic",
|
||||
"device_class": "foobarnotreal",
|
||||
}
|
||||
}
|
||||
|
@ -451,11 +451,14 @@ async def test_entity_debug_info_message(
|
|||
],
|
||||
)
|
||||
async def test_invalid_device_class(
|
||||
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||
hass: HomeAssistant,
|
||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
) -> None:
|
||||
"""Test device_class option with invalid value."""
|
||||
with pytest.raises(AssertionError):
|
||||
await mqtt_mock_entry()
|
||||
assert "expected ButtonDeviceClass" in caplog.text
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue