'Test include dir merge list yaml.'

@patch('homeassistant.util.yaml.os.walk')
def test_include_dir_merge_list(self, mock_walk):

    mock_walk.return_value = [['/tmp', [], ['first.yaml', 'second.yaml']]]
    with patch_yaml_files({'/tmp/first.yaml': '-    one', '/tmp/second.yaml': '-    two\n-    three'}):
        conf = 'key:    !include_dir_merge_list    /tmp'
        with io.StringIO(conf) as file:
            doc = yaml.yaml.safe_load(file)
            assert (sorted(doc['key']) == sorted(['one', 'two', 'three']))
