mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Improve entity platform tests (#124051)
This commit is contained in:
parent
c717e7a6f6
commit
14a3217d7e
@ -574,7 +574,7 @@ async def test_register_entity_service_non_entity_service_schema(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# The check currently does not recurse into vol.All or vol.Any allowing these
|
# The check currently does not recurse into vol.All or vol.Any allowing these
|
||||||
# non-compliatn schemas to pass
|
# non-compliant schemas to pass
|
||||||
component.async_register_entity_service(
|
component.async_register_entity_service(
|
||||||
"hello", vol.All(vol.Schema({"some": str})), Mock()
|
"hello", vol.All(vol.Schema({"some": str})), Mock()
|
||||||
)
|
)
|
||||||
|
@ -1809,6 +1809,14 @@ async def test_register_entity_service_non_entity_service_schema(
|
|||||||
vol.Schema({"some": str}),
|
vol.Schema({"some": str}),
|
||||||
Mock(),
|
Mock(),
|
||||||
)
|
)
|
||||||
|
# The check currently does not recurse into vol.All or vol.Any allowing these
|
||||||
|
# non-compliant schemas to pass
|
||||||
|
entity_platform.async_register_entity_service(
|
||||||
|
"hello", vol.All(vol.Schema({"some": str})), Mock()
|
||||||
|
)
|
||||||
|
entity_platform.async_register_entity_service(
|
||||||
|
"hello", vol.Any(vol.Schema({"some": str})), Mock()
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("update_before_add", [True, False])
|
@pytest.mark.parametrize("update_before_add", [True, False])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user