1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Enable Ruff PT012 (#113957)

This commit is contained in:
Sid
2024-06-08 17:59:08 +02:00
committed by GitHub
parent 915658daa1
commit 721b2c2ca8
90 changed files with 341 additions and 429 deletions

View File

@@ -3879,8 +3879,8 @@ async def test_device_attr(
assert_result_info(info, None)
assert info.rate_limit is None
info = render_to_info(hass, "{{ device_attr(56, 'id') }}")
with pytest.raises(TemplateError):
info = render_to_info(hass, "{{ device_attr(56, 'id') }}")
assert_result_info(info, None)
# Test non existing device ids (is_device_attr)
@@ -3888,8 +3888,8 @@ async def test_device_attr(
assert_result_info(info, False)
assert info.rate_limit is None
info = render_to_info(hass, "{{ is_device_attr(56, 'id', 'test') }}")
with pytest.raises(TemplateError):
info = render_to_info(hass, "{{ is_device_attr(56, 'id', 'test') }}")
assert_result_info(info, False)
# Test non existing entity id (device_attr)