summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlton Gibson <carlton.gibson@noumenal.es>2016-03-19 21:20:35 +0100
committerCarlton Gibson <carlton.gibson@noumenal.es>2016-03-19 21:20:35 +0100
commit71c2f9397bb24709ee0004e1a4481002e99da8a9 (patch)
tree2141ceeb2ee4c21ddb79fcbd9ccb807d5e4696a9
parentc323ecdf8ccf4e9c5f513f9d45352c95de541e2a (diff)
downloaddjango-appconf-71c2f9397bb24709ee0004e1a4481002e99da8a9.tar.gz
Add tests checking `override_settings` compat.
Ref #29 and #30
-rw-r--r--tests/tests.py13
1 files changed, 13 insertions, 0 deletions
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):