Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 7f6675a5fb5a11b00ecf61f1fceaa914d42daa01 1 parent 7166011
@jezdez jezdez authored
View
9 tests/regressiontests/staticfiles_tests/tests.py
@@ -34,7 +34,6 @@ def setUp(self):
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 @@ def setUp(self):
'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 @@ def tearDown(self):
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)
View
3  tests/runtests.py
@@ -29,6 +29,9 @@
'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):
Please sign in to comment.
Something went wrong with that request. Please try again.