diff options
| author | Tim Graham <timograham@gmail.com> | 2014-06-16 13:28:03 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-06-16 15:03:00 -0400 |
| commit | eb8600a65673649ea15ed18d17127f741807ac8b (patch) | |
| tree | 9b3ff41ab9a185a709c5b3c4d4184085c66b71ca /tests | |
| parent | 6e3ac5f4743b75c3e3dd36560c92af15e5b72997 (diff) | |
Added database migration for contrib.contenttypes.
Moved contenttypes tests to allow them to run correctly in the presence of
migrations. refs #22170.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/migrations/test_loader.py | 2 | ||||
| -rwxr-xr-x | tests/runtests.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/migrations/test_loader.py b/tests/migrations/test_loader.py index 4c1e2d239c..e03873a1ea 100644 --- a/tests/migrations/test_loader.py +++ b/tests/migrations/test_loader.py @@ -77,7 +77,7 @@ class LoaderTests(TestCase): ) # Ensure we've included unmigrated apps in there too - self.assertIn("contenttypes", project_state.real_apps) + self.assertIn("auth", project_state.real_apps) @override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations_unmigdep"}) def test_load_unmigrated_dependency(self): diff --git a/tests/runtests.py b/tests/runtests.py index c084f2590b..4c63415abf 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -128,6 +128,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 |
