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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user