Integration requirement check refactor (#25626)
* Factor out code getting requirements for integration * Have process requirements raise an exception * One more lint fix * Blackify * Catch new exception * Let RequirementsNotFound be a HomeAssistantError * Correct another test * Split catching of exceptions and avoid complete log
This commit is contained in:
parent
c3455efc11
commit
d1b9ebc7b2
9 changed files with 115 additions and 121 deletions
|
@ -75,7 +75,7 @@ async def test_component_platform_not_found(hass, loop):
|
|||
|
||||
assert res.keys() == {"homeassistant"}
|
||||
assert res.errors[0] == CheckConfigError(
|
||||
"Integration not found: beer", None, None
|
||||
"Component error: beer - Integration beer not found.", None, None
|
||||
)
|
||||
|
||||
# Only 1 error expected
|
||||
|
@ -95,9 +95,7 @@ async def test_component_platform_not_found_2(hass, loop):
|
|||
assert res["light"] == []
|
||||
|
||||
assert res.errors[0] == CheckConfigError(
|
||||
"Integration beer not found when trying to verify its " "light platform.",
|
||||
None,
|
||||
None,
|
||||
"Platform error light.beer - Integration beer not found.", None, None
|
||||
)
|
||||
|
||||
# Only 1 error expected
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue