diff --git a/django/test/testcases.py b/django/test/testcases.py
index 3ce96b0..bf3b161 100644
a
|
b
|
class SimpleTestCase(unittest.TestCase):
|
159 | 159 | client_class = Client |
160 | 160 | _custom_settings = None |
161 | 161 | |
| 162 | @classmethod |
| 163 | def setUpClass(cls): |
| 164 | if cls._custom_settings: |
| 165 | cls._cls_overridden = override_settings(**cls._custom_settings) |
| 166 | cls._cls_overridden.enable() |
| 167 | super(SimpleTestCase, cls).setUpClass() |
| 168 | |
| 169 | @classmethod |
| 170 | def tearDownClass(cls): |
| 171 | super(SimpleTestCase, cls).tearDownClass() |
| 172 | if cls._custom_settings: |
| 173 | cls._cls_overridden.disable() |
| 174 | |
162 | 175 | def __call__(self, result=None): |
163 | 176 | """ |
164 | 177 | Wrapper around default __call__ method to perform common Django test |
diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py
index 4a0c363..236f8b4 100644
a
|
b
|
class ClassDecoratedTestCaseSuper(TestCase):
|
54 | 54 | |
55 | 55 | @override_settings(TEST='override') |
56 | 56 | class ClassDecoratedTestCase(ClassDecoratedTestCaseSuper): |
| 57 | @classmethod |
| 58 | def setUpClass(cls): |
| 59 | super(cls, ClassDecoratedTestCase).setUpClass() |
| 60 | cls.foo = getattr(settings, 'TEST', 'BUG') |
| 61 | |
57 | 62 | def test_override(self): |
58 | 63 | self.assertEqual(settings.TEST, 'override') |
59 | 64 | |
| 65 | def test_setupclass_override(self): |
| 66 | self.assertNotEqual(self.foo, 'BUG') |
| 67 | |
60 | 68 | @override_settings(TEST='override2') |
61 | 69 | def test_method_override(self): |
62 | 70 | self.assertEqual(settings.TEST, 'override2') |