1
0
mirror of https://github.com/django/django.git synced 2025-10-25 22:56:12 +00:00

[1.7.x] Added database migration for contrib.contenttypes.

Moved contenttypes tests to allow them to run correctly in the presence of
migrations. refs #22170.

Backport of eb8600a656 from master
This commit is contained in:
Tim Graham
2014-06-16 13:28:03 -04:00
parent 02860e779c
commit a0bf14a2ac
8 changed files with 85 additions and 42 deletions

View File

@@ -129,6 +129,11 @@ def setup(verbosity, test_labels):
settings.MIDDLEWARE_CLASSES = ALWAYS_MIDDLEWARE_CLASSES
# Ensure the middleware classes are seen as overridden otherwise we get a compatibility warning.
settings._explicit_settings.add('MIDDLEWARE_CLASSES')
settings.MIGRATION_MODULES = {
# this module doesn't actually exist, but this lets us skip creating
# migrations for the test modules for some reason.
'contenttypes': 'django.contrib.contenttypes.tests.migrations',
}
if verbosity > 0:
# Ensure any warnings captured to logging are piped through a verbose