Fix load_yaml default value (#5383)

This commit is contained in:
Paulus Schoutsen 2017-01-16 22:08:47 -08:00 committed by GitHub
parent 0bbb16626c
commit 7511a5842d
2 changed files with 7 additions and 1 deletions

View file

@ -74,6 +74,12 @@ class TestYaml(unittest.TestCase):
doc = yaml.yaml.safe_load(file)
assert doc["key"] == "value"
with patch_yaml_files({'test.yaml': None}):
conf = 'key: !include test.yaml'
with io.StringIO(conf) as file:
doc = yaml.yaml.safe_load(file)
assert doc["key"] == {}
@patch('homeassistant.util.yaml.os.walk')
def test_include_dir_list(self, mock_walk):
"""Test include dir list yaml."""