summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/view_tests/tests/test_debug.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py
index f799325ae4..79c0d3fd75 100644
--- a/tests/view_tests/tests/test_debug.py
+++ b/tests/view_tests/tests/test_debug.py
@@ -21,7 +21,7 @@ from django.test.utils import (
setup_test_template_loader, restore_template_loaders)
from django.utils.encoding import force_text, force_bytes
from django.utils import six
-from django.views.debug import ExceptionReporter
+from django.views.debug import CallableSettingWrapper, ExceptionReporter
from .. import BrokenException, except_args
from ..views import (sensitive_view, non_sensitive_view, paranoid_view,
@@ -30,6 +30,21 @@ from ..views import (sensitive_view, non_sensitive_view, paranoid_view,
multivalue_dict_key_error)
+class CallableSettingWrapperTests(TestCase):
+ """ Unittests for CallableSettingWrapper
+ """
+ def test_repr(self):
+ class WrappedCallable(object):
+ def __repr__(self):
+ return "repr from the wrapped callable"
+
+ def __call__(self):
+ pass
+
+ actual = repr(CallableSettingWrapper(WrappedCallable()))
+ self.assertEqual(actual, "repr from the wrapped callable")
+
+
@override_settings(DEBUG=True, TEMPLATE_DEBUG=True)
class DebugViewTests(TestCase):
urls = "view_tests.urls"