diff --git a/tests/tests.py b/tests/tests.py index 5650acf..9ea13ed 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -2,6 +2,7 @@ from __future__ import absolute_import from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.test import TestCase +from django.test.utils import override_settings from .models import (AppConf, TestConf, PrefixConf, YetAnotherPrefixConf, SeparateConf, @@ -64,6 +65,18 @@ class TestConfTests(TestCase): self.assertTrue('TESTS_CONFIGURE_METHOD_VALUE2' in dir(settings)) self.assertEqual(settings.TESTS_CONFIGURE_METHOD_VALUE2, False) + # Pair of tests checking override_settings compat. + # See: + # https://github.com/django-compressor/django-appconf/issues/29 + # https://github.com/django-compressor/django-appconf/issues/30 + @override_settings(TESTS_SIMPLE_VALUE=False) + def test_override_settings_once(self): + self.assertEqual(settings.TESTS_SIMPLE_VALUE, False) + + @override_settings(TESTS_SIMPLE_VALUE=False) + def test_override_settings_twice(self): + self.assertEqual(settings.TESTS_SIMPLE_VALUE, False) + class PrefixConfTests(TestCase):