Custom component loading cleanup (#14211)

* Clean up custom component loading

* Fix some tests

* Fix some stuff

* Make imports work again

* Fix tests

* Remove debug print

* Lint
This commit is contained in:
Paulus Schoutsen 2018-05-01 14:57:30 -04:00 committed by Pascal Vizeli
parent 5d96751168
commit 83d300fd11
50 changed files with 315 additions and 392 deletions

View file

@ -50,15 +50,15 @@ async def test_component_translation_file(hass):
})
assert path.normpath(translation.component_translation_file(
'switch.test', 'en')) == path.normpath(hass.config.path(
hass, 'switch.test', 'en')) == path.normpath(hass.config.path(
'custom_components', 'switch', '.translations', 'test.en.json'))
assert path.normpath(translation.component_translation_file(
'test_standalone', 'en')) == path.normpath(hass.config.path(
hass, 'test_standalone', 'en')) == path.normpath(hass.config.path(
'custom_components', '.translations', 'test_standalone.en.json'))
assert path.normpath(translation.component_translation_file(
'test_package', 'en')) == path.normpath(hass.config.path(
hass, 'test_package', 'en')) == path.normpath(hass.config.path(
'custom_components', 'test_package', '.translations', 'en.json'))