Add tests checking override_settings compat.

Ref #29 and #30
This commit is contained in:
Carlton Gibson
2016-03-19 21:20:35 +01:00
parent c323ecdf8c
commit 71c2f9397b

View File

@@ -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):