mirror of
https://github.com/home-assistant/core.git
synced 2025-12-26 05:57:01 +00:00
Code styling tweaks to the tests - Part 1 (#86192)
This commit is contained in:
@@ -1177,9 +1177,9 @@ async def test_component_config_exceptions(hass, caplog):
|
||||
) == {"test_domain": []}
|
||||
assert "ValueError: broken" in caplog.text
|
||||
assert (
|
||||
"Unknown error validating test_platform platform config with test_domain component platform schema"
|
||||
in caplog.text
|
||||
)
|
||||
"Unknown error validating test_platform platform config "
|
||||
"with test_domain component platform schema"
|
||||
) in caplog.text
|
||||
|
||||
# platform.PLATFORM_SCHEMA
|
||||
caplog.clear()
|
||||
@@ -1204,8 +1204,8 @@ async def test_component_config_exceptions(hass, caplog):
|
||||
) == {"test_domain": []}
|
||||
assert "ValueError: broken" in caplog.text
|
||||
assert (
|
||||
"Unknown error validating config for test_platform platform for test_domain component with PLATFORM_SCHEMA"
|
||||
in caplog.text
|
||||
"Unknown error validating config for test_platform platform for test_domain"
|
||||
" component with PLATFORM_SCHEMA" in caplog.text
|
||||
)
|
||||
|
||||
# get_platform("config") raising
|
||||
@@ -1219,7 +1219,10 @@ async def test_component_config_exceptions(hass, caplog):
|
||||
domain="test_domain",
|
||||
get_platform=Mock(
|
||||
side_effect=ImportError(
|
||||
"ModuleNotFoundError: No module named 'not_installed_something'",
|
||||
(
|
||||
"ModuleNotFoundError: No module named"
|
||||
" 'not_installed_something'"
|
||||
),
|
||||
name="not_installed_something",
|
||||
)
|
||||
),
|
||||
@@ -1228,8 +1231,8 @@ async def test_component_config_exceptions(hass, caplog):
|
||||
is None
|
||||
)
|
||||
assert (
|
||||
"Error importing config platform test_domain: ModuleNotFoundError: No module named 'not_installed_something'"
|
||||
in caplog.text
|
||||
"Error importing config platform test_domain: ModuleNotFoundError: No module"
|
||||
" named 'not_installed_something'" in caplog.text
|
||||
)
|
||||
|
||||
# get_component raising
|
||||
|
||||
Reference in New Issue
Block a user