diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-02-05 13:20:33 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2015-02-05 13:21:50 +0100 |
| commit | 31d3a35579d3dd05d0de7eb384e7ed22b589ed96 (patch) | |
| tree | 4e7e20a35f6aa679e7b242c51fc16302296e7064 /tests/template_tests/test_context.py | |
| parent | de62b8ef4587e8f01462629e2812f06f9ddf71e8 (diff) | |
Fixed #24273 -- Allowed copying RequestContext more than once.
Thanks Collin Anderson for the report.
Diffstat (limited to 'tests/template_tests/test_context.py')
| -rw-r--r-- | tests/template_tests/test_context.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/template_tests/test_context.py b/tests/template_tests/test_context.py index c5ad3e1d50..24d589fb25 100644 --- a/tests/template_tests/test_context.py +++ b/tests/template_tests/test_context.py @@ -2,7 +2,8 @@ from unittest import TestCase -from django.template import Context, Variable, VariableDoesNotExist +from django.http import HttpRequest +from django.template import Context, RequestContext, Variable, VariableDoesNotExist from django.template.context import RenderContext @@ -83,3 +84,7 @@ class ContextTests(TestCase): # make contexts equals again b.update({'a': 1}) self.assertEqual(a, b) + + def test_copy_request_context_twice(self): + # Regression test for #24273 - this doesn't raise an exception + RequestContext(HttpRequest()).new().new() |
