2009-12-13 01:51:51 +08:00
|
|
|
from django.conf import settings
|
2010-10-11 20:55:17 +08:00
|
|
|
from django.utils import unittest
|
2009-12-13 01:51:51 +08:00
|
|
|
|
|
|
|
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')
|