Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…anks, jcassee. Backport of r11824. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11825 bcc190cf-cafb-0310-a4f2-bffc1f526a37
- Loading branch information
Showing
4 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -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') |