summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/context_processors/templates/context_processors/debug.html4
-rw-r--r--tests/context_processors/tests.py2
-rw-r--r--tests/context_processors/views.py5
3 files changed, 10 insertions, 1 deletions
diff --git a/tests/context_processors/templates/context_processors/debug.html b/tests/context_processors/templates/context_processors/debug.html
index 671ab81372..076fa4cd87 100644
--- a/tests/context_processors/templates/context_processors/debug.html
+++ b/tests/context_processors/templates/context_processors/debug.html
@@ -12,4 +12,8 @@ Second query list: {{ sql_queries|length }}
Third query list: {{ sql_queries|length }}
+{% for obj in other_debug_objects.all %}{{ obj }}{% endfor %}
+
+Fourth query list: {{ sql_queries|length }}
+
{% endif %}
diff --git a/tests/context_processors/tests.py b/tests/context_processors/tests.py
index de25735b5c..f9c461cad9 100644
--- a/tests/context_processors/tests.py
+++ b/tests/context_processors/tests.py
@@ -87,3 +87,5 @@ class DebugContextProcessorTests(TestCase):
self.assertContains(response, 'Second query list: 1')
# Check we have not actually memoized connection.queries
self.assertContains(response, 'Third query list: 2')
+ # Check queries for DB connection 'other'
+ self.assertContains(response, 'Fourth query list: 3')
diff --git a/tests/context_processors/views.py b/tests/context_processors/views.py
index 1a7eda0b16..354e842a8d 100644
--- a/tests/context_processors/views.py
+++ b/tests/context_processors/views.py
@@ -8,5 +8,8 @@ def request_processor(request):
def debug_processor(request):
- context = {'debug_objects': DebugObject.objects}
+ context = {
+ 'debug_objects': DebugObject.objects,
+ 'other_debug_objects': DebugObject.objects.using('other'),
+ }
return render(request, 'context_processors/debug.html', context)