'[JIRA-1357] Test the \'list_py_file_paths\' function used by the
scheduler to list and load DAGs.'

def test_list_py_file_paths(self):

    detected_files = []
    expected_files = []
    for file_name in os.listdir(TEST_DAGS_FOLDER):
        if (file_name.endswith(u'.py') or file_name.endswith(u'.zip')):
            if (file_name not in [u'no_dags.py']):
                expected_files.append(u'{}/{}'.format(TEST_DAGS_FOLDER, file_name))
    for file_path in list_py_file_paths(TEST_DAGS_FOLDER):
        detected_files.append(file_path)
    self.assertEqual(sorted(detected_files), sorted(expected_files))
