Fix template sensor test relying on event bus debug logging (#113842)
parent
879e5bc961
commit
6b5518b2bf
|
@ -476,7 +476,11 @@ async def test_invalid_attribute_template(
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
await async_update_entity(hass, "sensor.invalid_template")
|
await async_update_entity(hass, "sensor.invalid_template")
|
||||||
assert "TemplateError" in caplog_setup_text
|
assert "TemplateError" in caplog_setup_text
|
||||||
assert "test_attribute" in caplog.text
|
assert (
|
||||||
|
"Template variable error: 'None' has no attribute 'attributes' when rendering"
|
||||||
|
in caplog.text
|
||||||
|
)
|
||||||
|
assert hass.states.get("sensor.invalid_template").state == "startup"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(("count", "domain"), [(1, sensor.DOMAIN)])
|
@pytest.mark.parametrize(("count", "domain"), [(1, sensor.DOMAIN)])
|
||||||
|
|
Loading…
Reference in New Issue