mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Stopped staticfiles from modifying INSTALLED_APPS during test runtime.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16344 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
716601109a
commit
7f6675a5fb
@ -34,7 +34,6 @@ class StaticFilesTestCase(TestCase):
|
||||
self.old_media_url = settings.MEDIA_URL
|
||||
self.old_admin_media_prefix = settings.ADMIN_MEDIA_PREFIX
|
||||
self.old_debug = settings.DEBUG
|
||||
self.old_installed_apps = settings.INSTALLED_APPS
|
||||
|
||||
site_media = os.path.join(TEST_ROOT, 'project', 'site_media')
|
||||
settings.DEBUG = True
|
||||
@ -51,13 +50,6 @@ class StaticFilesTestCase(TestCase):
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
||||
)
|
||||
settings.INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.staticfiles',
|
||||
'regressiontests.staticfiles_tests',
|
||||
'regressiontests.staticfiles_tests.apps.test',
|
||||
'regressiontests.staticfiles_tests.apps.no_label',
|
||||
]
|
||||
|
||||
# Clear the cached default_storage out, this is because when it first
|
||||
# gets accessed (by some other test), it evaluates settings.MEDIA_ROOT,
|
||||
@ -83,7 +75,6 @@ class StaticFilesTestCase(TestCase):
|
||||
settings.STATIC_URL = self.old_static_url
|
||||
settings.STATICFILES_DIRS = self.old_staticfiles_dirs
|
||||
settings.STATICFILES_FINDERS = self.old_staticfiles_finders
|
||||
settings.INSTALLED_APPS = self.old_installed_apps
|
||||
if os.path.exists(self._nonascii_filepath):
|
||||
os.unlink(self._nonascii_filepath)
|
||||
|
||||
|
@ -29,6 +29,9 @@ ALWAYS_INSTALLED_APPS = [
|
||||
'django.contrib.admindocs',
|
||||
'django.contrib.staticfiles',
|
||||
'django.contrib.humanize',
|
||||
'regressiontests.staticfiles_tests',
|
||||
'regressiontests.staticfiles_tests.apps.test',
|
||||
'regressiontests.staticfiles_tests.apps.no_label',
|
||||
]
|
||||
|
||||
def geodjango(settings):
|
||||
|
Loading…
Reference in New Issue
Block a user