Adds guards for missing information in call stack frames (#27217)

This commit is contained in:
Franck Nijhof 2019-10-05 11:59:34 +02:00 committed by Pascal Vizeli
parent 71a3516053
commit 2e17ad86af
5 changed files with 34 additions and 12 deletions

View file

@ -494,7 +494,10 @@ def test_deprecated_with_no_optionals(caplog, schema):
test_data = {"mars": True}
output = deprecated_schema(test_data.copy())
assert len(caplog.records) == 1
assert caplog.records[0].name == __name__
assert caplog.records[0].name in [
__name__,
"homeassistant.helpers.config_validation",
]
assert (
"The 'mars' option (with value 'True') is deprecated, "
"please remove it from your configuration"