mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed the tests I broke with [11824].
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
This commit is contained in:
17
tests/regressiontests/settings_tests/tests.py
Normal file
17
tests/regressiontests/settings_tests/tests.py
Normal 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')
|
||||
Reference in New Issue
Block a user