This commit is contained in:
epenet 2025-07-02 11:16:39 +00:00
parent 0052a1a336
commit b01cc38bc8

View File

@ -1721,8 +1721,8 @@ _DEPRECATED_VERIFY_DOMAIN_CONTROL_MESSAGE = (
# Check that with or without hass behaves the same
("decorator", "in_caplog"),
[
(service.verify_domain_control, True), # deprecated with hass
(lambda _, domain: service.verify_domain_control(domain), False),
(service.verify_domain_control, True), # old pass-through
(lambda _, domain: service.verify_domain_control(domain), False), # new
],
)
async def test_domain_control_not_async(
@ -1749,8 +1749,8 @@ async def test_domain_control_not_async(
# Check that with or without hass behaves the same
("decorator", "in_caplog"),
[
(service.verify_domain_control, True), # deprecated with hass
(lambda _, domain: service.verify_domain_control(domain), False),
(service.verify_domain_control, True), # old pass-through
(lambda _, domain: service.verify_domain_control(domain), False), # new
],
)
async def test_domain_control_unknown(
@ -1794,8 +1794,8 @@ async def test_domain_control_unknown(
# Check that with or without hass behaves the same
("decorator", "in_caplog"),
[
(service.verify_domain_control, True), # deprecated with hass
(lambda _, domain: service.verify_domain_control(domain), False),
(service.verify_domain_control, True), # old pass-through
(lambda _, domain: service.verify_domain_control(domain), False), # new
],
)
async def test_domain_control_unauthorized(
@ -1847,8 +1847,8 @@ async def test_domain_control_unauthorized(
# Check that with or without hass behaves the same
("decorator", "in_caplog"),
[
(service.verify_domain_control, True), # deprecated with hass
(lambda _, domain: service.verify_domain_control(domain), False),
(service.verify_domain_control, True), # old pass-through
(lambda _, domain: service.verify_domain_control(domain), False), # new
],
)
async def test_domain_control_admin(
@ -1899,8 +1899,8 @@ async def test_domain_control_admin(
# Check that with or without hass behaves the same
("decorator", "in_caplog"),
[
(service.verify_domain_control, True), # deprecated with hass
(lambda _, domain: service.verify_domain_control(domain), False),
(service.verify_domain_control, True), # old pass-through
(lambda _, domain: service.verify_domain_control(domain), False), # new
],
)
async def test_domain_control_no_user(