diff options
| author | Tim Graham <timograham@gmail.com> | 2016-11-07 18:19:34 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-01-17 14:09:28 -0500 |
| commit | f032bbc8b107ab9274542f8d233fc88aa1c6e04d (patch) | |
| tree | 4113c993f2d0018bfd3cc23d656a2ecd981d5149 /tests/template_tests/test_custom.py | |
| parent | 742d666da57b52a3b00aa9b1c527ece829e95245 (diff) | |
Refs #18651 -- Removed assignment_tag per deprecation timeline.
Diffstat (limited to 'tests/template_tests/test_custom.py')
| -rw-r--r-- | tests/template_tests/test_custom.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/template_tests/test_custom.py b/tests/template_tests/test_custom.py index e6a876086e..b63882a9a8 100644 --- a/tests/template_tests/test_custom.py +++ b/tests/template_tests/test_custom.py @@ -306,29 +306,6 @@ class InclusionTagTests(TagTestCase): self.assertEqual(template.render(Context({})).strip(), 'one\ntwo') -class AssignmentTagTests(TagTestCase): - - def test_assignment_tags(self): - c = Context({'value': 42}) - - t = self.engine.from_string('{% load custom %}{% assignment_no_params as var %}The result is: {{ var }}') - self.assertEqual(t.render(c), 'The result is: assignment_no_params - Expected result') - - def test_assignment_tag_registration(self): - # The decorators preserve the decorated function's docstring, name, - # and attributes. - self.verify_tag(custom.assignment_no_params, 'assignment_no_params') - - def test_assignment_tag_missing_context(self): - # The 'context' parameter must be present when takes_context is True - msg = ( - "'assignment_tag_without_context_parameter' is decorated with " - "takes_context=True so it must have a first argument of 'context'" - ) - with self.assertRaisesMessage(TemplateSyntaxError, msg): - self.engine.from_string('{% load custom %}{% assignment_tag_without_context_parameter 123 as var %}') - - class TemplateTagLoadingTests(SimpleTestCase): @classmethod |
