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:
Joakim Plate authored and Paulus Schoutsen committed 2019-08-07 15:35:50 -07:00
1 parent c3455efc11
commit d1b9ebc7b2
9 files changed
+115 -121

No files matched your search

+4 -3
View File
@@ -62,7 +62,9 @@ def test_component_platform_not_found(isfile_patch, loop):
res = check_config.check(get_test_config_dir())
assert res["components"].keys() == {"homeassistant"}
assert res["except"] == {
check_config.ERROR_STR: ["Integration not found: beer"]
check_config.ERROR_STR: [
"Component error: beer - Integration beer not found."
]
}
assert res["secret_cache"] == {}
assert res["secrets"] == {}
@@ -75,8 +77,7 @@ def test_component_platform_not_found(isfile_patch, loop):
assert res["components"]["light"] == []
assert res["except"] == {
check_config.ERROR_STR: [
"Integration beer not found when trying to verify its "
"light platform."
"Platform error light.beer - Integration beer not found."
]
}
assert res["secret_cache"] == {}