Warn when using custom components (#15172)
* Warn when using custom components * Update text
This commit is contained in:
1 parent
c0b6a857f7
commit
742144f401
2 files changed
+19
-1
No files matched your search
@@ -124,3 +124,13 @@ async def test_custom_component_name(hass):
|
||||
# Test custom components is mounted
|
||||
from custom_components.test_package import TEST
|
||||
assert TEST == 5
|
||||
|
||||
|
||||
async def test_log_warning_custom_component(hass, caplog):
|
||||
"""Test that we log a warning when loading a custom component."""
|
||||
loader.get_component(hass, 'test_standalone')
|
||||
assert \
|
||||
'You are using a custom component for test_standalone' in caplog.text
|
||||
|
||||
loader.get_component(hass, 'light.test')
|
||||
assert 'You are using a custom component for light.test' in caplog.text
|
||||
Reference in new issue
Block a user