summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/template_tests/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py
index c2179b43c1..e9c0a0f7c4 100644
--- a/tests/template_tests/tests.py
+++ b/tests/template_tests/tests.py
@@ -1843,3 +1843,12 @@ class RequestContextTests(unittest.TestCase):
template.Template('{% include "child" only %}').render(ctx),
'none'
)
+
+ def test_stack_size(self):
+ """
+ Regression test for #7116, Optimize RequetsContext construction
+ """
+ ctx = RequestContext(self.fake_request, {})
+ # The stack should now contain 3 items:
+ # [builtins, supplied context, context processor]
+ self.assertEqual(len(ctx.dicts), 3)