Adapt tests so that not relying on undefined

behaviour.
The app directories can appear in any order, we need to allow that
in tests.
This commit is contained in:
Felix authored and David Wobrock committed 2018-12-23 12:25:41 +01:00
1 parent 395379178b
commit 357f0aebf4
3 files changed
+50 -23

No files matched your search

+2 -1
View File
@@ -18,6 +18,7 @@ import os
import re
from subprocess import Popen, PIPE
import sys
from . import utils
from .sql_analyser import analyse_sql_statements
@@ -186,7 +187,7 @@ class MigrationLinter(object):
def _gather_all_migrations(self):
migrations = []
for root, dirs, files in os.walk(self.django_path):
for file_name in files:
for file_name in sorted(files):
if os.path.basename(root) == self.MIGRATION_FOLDER_NAME and \
file_name.endswith('.py') and \
file_name != '__init__.py':