'Test include dir list yaml.'

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

    mock_walk.return_value = [['/tmp', [], ['one.yaml', 'two.yaml']]]
    with patch_yaml_files({'/tmp/one.yaml': 'one', '/tmp/two.yaml': 'two'}):
        conf = 'key:    !include_dir_list    /tmp'
        with io.StringIO(conf) as file:
            doc = yaml.yaml.safe_load(file)
            assert (sorted(doc['key']) == sorted(['one', 'two']))
