mirror of
https://github.com/django/django.git
synced 2024-11-19 07:54:07 +00:00
85ccad4d61
Note to self: naming a module "settings" is a really good way of screwing things up. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
18 lines
481 B
Python
18 lines
481 B
Python
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')
|