Fixed admin_checks tests to run in isolation.

This commit is contained in:
Jon Dufresne 2018-08-19 08:04:57 -07:00
parent 3daac76cfb
commit 03a2c783e8
1 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,12 @@ class MyAdmin(admin.ModelAdmin):
@override_settings( @override_settings(
SILENCED_SYSTEM_CHECKS=['fields.W342'], # ForeignKey(unique=True) SILENCED_SYSTEM_CHECKS=['fields.W342'], # ForeignKey(unique=True)
INSTALLED_APPS=['django.contrib.auth', 'django.contrib.contenttypes', 'admin_checks'] INSTALLED_APPS=[
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'admin_checks',
],
) )
class SystemChecksTestCase(SimpleTestCase): class SystemChecksTestCase(SimpleTestCase):
@ -69,11 +74,6 @@ class SystemChecksTestCase(SimpleTestCase):
self.assertEqual(admin.checks.check_dependencies(), []) self.assertEqual(admin.checks.check_dependencies(), [])
@override_settings( @override_settings(
INSTALLED_APPS=[
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
],
TEMPLATES=[{ TEMPLATES=[{
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [], 'DIRS': [],