~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to tests/regressiontests/settings_tests/tests.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2010-05-21 07:52:55 UTC
  • mfrom: (1.3.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20100521075255-ii78v1dyfmyu3uzx
Tags: upstream-1.2
ImportĀ upstreamĀ versionĀ 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import unittest
 
2
from django.conf import settings
 
3
 
 
4
class SettingsTests(unittest.TestCase):
 
5
 
 
6
    #
 
7
    # Regression tests for #10130: deleting settings.
 
8
    #
 
9
 
 
10
    def test_settings_delete(self):
 
11
        settings.TEST = 'test'
 
12
        self.assertEqual('test', settings.TEST)
 
13
        del settings.TEST
 
14
        self.assertRaises(AttributeError, getattr, settings, 'TEST')
 
15
 
 
16
    def test_settings_delete_wrapped(self):
 
17
        self.assertRaises(TypeError, delattr, settings, '_wrapped')