FIxed #10130: you may now delete attributes on settings. Thanks, jcassee.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2009-12-12 17:51:51 +00:00
parent f761802b22
commit ac8da7b36f
4 changed files with 24 additions and 0 deletions

View file

View file

@ -0,0 +1,17 @@
import unittest
from django.conf import settings
class SettingsTests(unittest.TestCase):
#
# Regression tests for #10130: deleting settings.
#
def test_settings_delete(self):
settings.TEST = 'test'
self.assertEqual('test', settings.TEST)
del settings.TEST
self.assertRaises(AttributeError, getattr, settings, 'TEST')
def test_settings_delete_wrapped(self):
self.assertRaises(TypeError, delattr, settings, '_wrapped')