diff options
| author | Tim Graham <timograham@gmail.com> | 2015-06-22 13:54:35 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-06-23 07:22:16 -0400 |
| commit | ae1d663b7913f6da233c55409c4973248372d302 (patch) | |
| tree | 1ac06b1eccd77be127ae8d046e9ade878623c176 /tests/template_tests | |
| parent | 7439039806038ce35d3a91f430037c667dcab051 (diff) | |
[1.8.x] Renamed RemovedInDjango20Warning to RemovedInDjango110Warning.
Diffstat (limited to 'tests/template_tests')
| -rw-r--r-- | tests/template_tests/filter_tests/test_removetags.py | 6 | ||||
| -rw-r--r-- | tests/template_tests/filter_tests/test_unordered_list.py | 8 | ||||
| -rw-r--r-- | tests/template_tests/syntax_tests/test_cycle.py | 8 | ||||
| -rw-r--r-- | tests/template_tests/syntax_tests/test_firstof.py | 10 | ||||
| -rw-r--r-- | tests/template_tests/syntax_tests/test_for.py | 12 | ||||
| -rw-r--r-- | tests/template_tests/syntax_tests/test_if.py | 8 | ||||
| -rw-r--r-- | tests/template_tests/syntax_tests/test_ssi.py | 6 | ||||
| -rw-r--r-- | tests/template_tests/syntax_tests/test_url.py | 40 | ||||
| -rw-r--r-- | tests/template_tests/test_custom.py | 4 | ||||
| -rw-r--r-- | tests/template_tests/test_engine.py | 6 | ||||
| -rw-r--r-- | tests/template_tests/test_response.py | 8 |
11 files changed, 58 insertions, 58 deletions
diff --git a/tests/template_tests/filter_tests/test_removetags.py b/tests/template_tests/filter_tests/test_removetags.py index 4b3dd161e7..9cc6c5a4f9 100644 --- a/tests/template_tests/filter_tests/test_removetags.py +++ b/tests/template_tests/filter_tests/test_removetags.py @@ -1,12 +1,12 @@ from django.template.defaultfilters import removetags from django.test import SimpleTestCase, ignore_warnings -from django.utils.deprecation import RemovedInDjango20Warning +from django.utils.deprecation import RemovedInDjango110Warning from django.utils.safestring import mark_safe from ..utils import setup -@ignore_warnings(category=RemovedInDjango20Warning) +@ignore_warnings(category=RemovedInDjango110Warning) class RemovetagsTests(SimpleTestCase): @setup({'removetags01': '{{ a|removetags:"a b" }} {{ b|removetags:"a b" }}'}) @@ -33,7 +33,7 @@ class RemovetagsTests(SimpleTestCase): self.assertEqual(output, 'x <p>y</p> x <p>y</p>') -@ignore_warnings(category=RemovedInDjango20Warning) +@ignore_warnings(category=RemovedInDjango110Warning) class FunctionTests(SimpleTestCase): def test_removetags(self): diff --git a/tests/template_tests/filter_tests/test_unordered_list.py b/tests/template_tests/filter_tests/test_unordered_list.py index 815d488347..77e5bab0c6 100644 --- a/tests/template_tests/filter_tests/test_unordered_list.py +++ b/tests/template_tests/filter_tests/test_unordered_list.py @@ -1,6 +1,6 @@ from django.template.defaultfilters import unordered_list from django.test import SimpleTestCase, ignore_warnings -from django.utils.deprecation import RemovedInDjango20Warning +from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import python_2_unicode_compatible from django.utils.safestring import mark_safe @@ -14,7 +14,7 @@ class UnorderedListTests(SimpleTestCase): output = self.engine.render_to_string('unordered_list01', {'a': ['x>', ['<y']]}) self.assertEqual(output, '\t<li>x>\n\t<ul>\n\t\t<li><y</li>\n\t</ul>\n\t</li>') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'unordered_list02': '{% autoescape off %}{{ a|unordered_list }}{% endautoescape %}'}) def test_unordered_list02(self): output = self.engine.render_to_string('unordered_list02', {'a': ['x>', ['<y']]}) @@ -36,7 +36,7 @@ class UnorderedListTests(SimpleTestCase): self.assertEqual(output, '\t<li>x>\n\t<ul>\n\t\t<li><y</li>\n\t</ul>\n\t</li>') -@ignore_warnings(category=RemovedInDjango20Warning) +@ignore_warnings(category=RemovedInDjango110Warning) class DeprecatedUnorderedListSyntaxTests(SimpleTestCase): @setup({'unordered_list01': '{{ a|unordered_list }}'}) @@ -165,7 +165,7 @@ class FunctionTests(SimpleTestCase): '\t<li>ulitem-a</li>\n\t<li>ulitem-b</li>\n\t<li>ulitem-<a>c</a></li>', ) - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) def test_legacy(self): """ Old format for unordered lists should still work diff --git a/tests/template_tests/syntax_tests/test_cycle.py b/tests/template_tests/syntax_tests/test_cycle.py index 88a7187b1a..b5f53028c0 100644 --- a/tests/template_tests/syntax_tests/test_cycle.py +++ b/tests/template_tests/syntax_tests/test_cycle.py @@ -1,6 +1,6 @@ from django.template import TemplateSyntaxError from django.test import SimpleTestCase, ignore_warnings -from django.utils.deprecation import RemovedInDjango20Warning +from django.utils.deprecation import RemovedInDjango110Warning from ..utils import setup @@ -139,20 +139,20 @@ class CycleTagTests(SimpleTestCase): output = self.engine.render_to_string('cycle25', {'a': '<'}) self.assertEqual(output, '<') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'cycle26': '{% load cycle from future %}{% cycle a b as ab %}{% cycle ab %}'}) def test_cycle26(self): output = self.engine.render_to_string('cycle26', {'a': '<', 'b': '>'}) self.assertEqual(output, '<>') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'cycle27': '{% load cycle from future %}' '{% autoescape off %}{% cycle a b as ab %}{% cycle ab %}{% endautoescape %}'}) def test_cycle27(self): output = self.engine.render_to_string('cycle27', {'a': '<', 'b': '>'}) self.assertEqual(output, '<>') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'cycle28': '{% load cycle from future %}{% cycle a|safe b as ab %}{% cycle ab %}'}) def test_cycle28(self): output = self.engine.render_to_string('cycle28', {'a': '<', 'b': '>'}) diff --git a/tests/template_tests/syntax_tests/test_firstof.py b/tests/template_tests/syntax_tests/test_firstof.py index 2c227f2304..81e81540e2 100644 --- a/tests/template_tests/syntax_tests/test_firstof.py +++ b/tests/template_tests/syntax_tests/test_firstof.py @@ -1,6 +1,6 @@ from django.template import TemplateSyntaxError from django.test import SimpleTestCase, ignore_warnings -from django.utils.deprecation import RemovedInDjango20Warning +from django.utils.deprecation import RemovedInDjango110Warning from ..utils import setup @@ -57,26 +57,26 @@ class FirstOfTagTests(SimpleTestCase): output = self.engine.render_to_string('firstof10', {'a': '<'}) self.assertEqual(output, '<') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'firstof11': '{% load firstof from future %}{% firstof a b %}'}) def test_firstof11(self): output = self.engine.render_to_string('firstof11', {'a': '<', 'b': '>'}) self.assertEqual(output, '<') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'firstof12': '{% load firstof from future %}{% firstof a b %}'}) def test_firstof12(self): output = self.engine.render_to_string('firstof12', {'a': '', 'b': '>'}) self.assertEqual(output, '>') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'firstof13': '{% load firstof from future %}' '{% autoescape off %}{% firstof a %}{% endautoescape %}'}) def test_firstof13(self): output = self.engine.render_to_string('firstof13', {'a': '<'}) self.assertEqual(output, '<') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'firstof14': '{% load firstof from future %}{% firstof a|safe b %}'}) def test_firstof14(self): output = self.engine.render_to_string('firstof14', {'a': '<'}) diff --git a/tests/template_tests/syntax_tests/test_for.py b/tests/template_tests/syntax_tests/test_for.py index 566b86f3d8..6883ea09cf 100644 --- a/tests/template_tests/syntax_tests/test_for.py +++ b/tests/template_tests/syntax_tests/test_for.py @@ -1,6 +1,6 @@ from django.template import TemplateSyntaxError from django.test import SimpleTestCase, ignore_warnings -from django.utils.deprecation import RemovedInDjango20Warning +from django.utils.deprecation import RemovedInDjango110Warning from ..utils import setup @@ -125,9 +125,9 @@ class ForTagTests(SimpleTestCase): self.assertEqual(output, 'abc') # These tests raise deprecation warnings and will raise an exception - # in Django 2.0. The existing behavior is silent truncation if the + # in Django 1.10. The existing behavior is silent truncation if the # length of loopvars differs to the length of each set of items. - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'for-tag-unpack10': '{% for x,y in items %}{{ x }}:{{ y }}/{% endfor %}'}) def test_for_tag_unpack10(self): output = self.engine.render_to_string( @@ -136,7 +136,7 @@ class ForTagTests(SimpleTestCase): ) self.assertEqual(output, 'one:1/two:2/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'for-tag-unpack11': '{% for x,y,z in items %}{{ x }}:{{ y }},{{ z }}/{% endfor %}'}) def test_for_tag_unpack11(self): output = self.engine.render_to_string( @@ -149,7 +149,7 @@ class ForTagTests(SimpleTestCase): else: self.assertEqual(output, 'one:1,/two:2,/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'for-tag-unpack12': '{% for x,y,z in items %}{{ x }}:{{ y }},{{ z }}/{% endfor %}'}) def test_for_tag_unpack12(self): output = self.engine.render_to_string( @@ -161,7 +161,7 @@ class ForTagTests(SimpleTestCase): else: self.assertEqual(output, 'one:1,carrot/two:2,/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'for-tag-unpack14': '{% for x,y in items %}{{ x }}:{{ y }}/{% endfor %}'}) def test_for_tag_unpack14(self): output = self.engine.render_to_string('for-tag-unpack14', {'items': (1, 2)}) diff --git a/tests/template_tests/syntax_tests/test_if.py b/tests/template_tests/syntax_tests/test_if.py index 290a092a04..6bbf2598a1 100644 --- a/tests/template_tests/syntax_tests/test_if.py +++ b/tests/template_tests/syntax_tests/test_if.py @@ -3,7 +3,7 @@ import warnings from django.template import TemplateSyntaxError from django.test import SimpleTestCase, ignore_warnings from django.test.utils import reset_warning_registry -from django.utils.deprecation import RemovedInDjango20Warning +from django.utils.deprecation import RemovedInDjango110Warning from ..utils import TestObj, setup @@ -537,15 +537,15 @@ class IfTagTests(SimpleTestCase): self.assertEqual(len(warns), 1) self.assertEqual( str(warns[0].message), - "Operator '=' is deprecated and will be removed in Django 2.0. " + "Operator '=' is deprecated and will be removed in Django 1.10. " "Use '==' instead." ) -@ignore_warnings(category=RemovedInDjango20Warning) +@ignore_warnings(category=RemovedInDjango110Warning) class TestEqualitySingleEqualsSign(SimpleTestCase): # The following tests should be changed to template.TemplateSyntaxError - # (or simply removed) when the deprecation path ends in Django 2.0. + # (or simply removed) when the deprecation path ends in Django 1.10. @setup({'if-tag-eq01': '{% if foo = bar %}yes{% else %}no{% endif %}'}) def test_if_tag_eq01(self): output = self.engine.render_to_string('if-tag-eq01', {'foo': 1}) diff --git a/tests/template_tests/syntax_tests/test_ssi.py b/tests/template_tests/syntax_tests/test_ssi.py index c650889020..ea8ac71ec9 100644 --- a/tests/template_tests/syntax_tests/test_ssi.py +++ b/tests/template_tests/syntax_tests/test_ssi.py @@ -5,13 +5,13 @@ import os from django.template import Context, Engine from django.test import SimpleTestCase, ignore_warnings from django.utils.deprecation import ( - RemovedInDjango19Warning, RemovedInDjango20Warning, + RemovedInDjango19Warning, RemovedInDjango110Warning, ) from ..utils import ROOT, setup -@ignore_warnings(category=RemovedInDjango20Warning) +@ignore_warnings(category=RemovedInDjango110Warning) class SsiTagTests(SimpleTestCase): # Test normal behavior @@ -85,7 +85,7 @@ class SsiTagTests(SimpleTestCase): 'with spaces in its name. Look ma! It parsed!\n') -@ignore_warnings(category=RemovedInDjango20Warning) +@ignore_warnings(category=RemovedInDjango110Warning) class SSISecurityTests(SimpleTestCase): def setUp(self): diff --git a/tests/template_tests/syntax_tests/test_url.py b/tests/template_tests/syntax_tests/test_url.py index 8da4dba67b..d593591480 100644 --- a/tests/template_tests/syntax_tests/test_url.py +++ b/tests/template_tests/syntax_tests/test_url.py @@ -2,7 +2,7 @@ from django.core.urlresolvers import NoReverseMatch from django.template import TemplateSyntaxError from django.test import SimpleTestCase, ignore_warnings, override_settings -from django.utils.deprecation import RemovedInDjango20Warning +from django.utils.deprecation import RemovedInDjango110Warning from ..utils import setup @@ -11,37 +11,37 @@ from ..utils import setup class UrlTagTests(SimpleTestCase): # Successes - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url01': '{% url "template_tests.views.client" client.id %}'}) def test_url01(self): output = self.engine.render_to_string('url01', {'client': {'id': 1}}) self.assertEqual(output, '/client/1/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url02': '{% url "template_tests.views.client_action" id=client.id action="update" %}'}) def test_url02(self): output = self.engine.render_to_string('url02', {'client': {'id': 1}}) self.assertEqual(output, '/client/1/update/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url02a': '{% url "template_tests.views.client_action" client.id "update" %}'}) def test_url02a(self): output = self.engine.render_to_string('url02a', {'client': {'id': 1}}) self.assertEqual(output, '/client/1/update/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url02b': "{% url 'template_tests.views.client_action' id=client.id action='update' %}"}) def test_url02b(self): output = self.engine.render_to_string('url02b', {'client': {'id': 1}}) self.assertEqual(output, '/client/1/update/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url02c': "{% url 'template_tests.views.client_action' client.id 'update' %}"}) def test_url02c(self): output = self.engine.render_to_string('url02c', {'client': {'id': 1}}) self.assertEqual(output, '/client/1/update/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url03': '{% url "template_tests.views.index" %}'}) def test_url03(self): output = self.engine.render_to_string('url03') @@ -62,7 +62,7 @@ class UrlTagTests(SimpleTestCase): output = self.engine.render_to_string('url06', {'v': 'Ω'}) self.assertEqual(output, '/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url07': '{% url "template_tests.views.client2" tag=v %}'}) def test_url07(self): output = self.engine.render_to_string('url07', {'v': 'Ω'}) @@ -78,13 +78,13 @@ class UrlTagTests(SimpleTestCase): output = self.engine.render_to_string('url09', {'v': 'Ω'}) self.assertEqual(output, '/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url10': '{% url "template_tests.views.client_action" id=client.id action="two words" %}'}) def test_url10(self): output = self.engine.render_to_string('url10', {'client': {'id': 1}}) self.assertEqual(output, '/client/1/two%20words/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url11': '{% url "template_tests.views.client_action" id=client.id action="==" %}'}) def test_url11(self): output = self.engine.render_to_string('url11', {'client': {'id': 1}}) @@ -92,37 +92,37 @@ class UrlTagTests(SimpleTestCase): @setup({'url12': '{% url "template_tests.views.client_action" ' 'id=client.id action="!$&\'()*+,;=~:@," %}'}) - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) def test_url12(self): output = self.engine.render_to_string('url12', {'client': {'id': 1}}) self.assertEqual(output, '/client/1/!$&\'()*+,;=~:@,/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url13': '{% url "template_tests.views.client_action" ' 'id=client.id action=arg|join:"-" %}'}) def test_url13(self): output = self.engine.render_to_string('url13', {'client': {'id': 1}, 'arg': ['a', 'b']}) self.assertEqual(output, '/client/1/a-b/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url14': '{% url "template_tests.views.client_action" client.id arg|join:"-" %}'}) def test_url14(self): output = self.engine.render_to_string('url14', {'client': {'id': 1}, 'arg': ['a', 'b']}) self.assertEqual(output, '/client/1/a-b/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url15': '{% url "template_tests.views.client_action" 12 "test" %}'}) def test_url15(self): output = self.engine.render_to_string('url15') self.assertEqual(output, '/client/12/test/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url18': '{% url "template_tests.views.client" "1,2" %}'}) def test_url18(self): output = self.engine.render_to_string('url18') self.assertEqual(output, '/client/1,2/') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url19': '{% url named_url client.id %}'}) def test_url19(self): output = self.engine.render_to_string('url19', {'client': {'id': 1}, 'named_url': 'template_tests.views.client'}) @@ -144,7 +144,7 @@ class UrlTagTests(SimpleTestCase): with self.assertRaises(NoReverseMatch): self.engine.render_to_string('url-fail02') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url-fail03': '{% url "template_tests.views.client" %}'}) def test_url_fail03(self): with self.assertRaises(NoReverseMatch): @@ -190,7 +190,7 @@ class UrlTagTests(SimpleTestCase): with self.assertRaises(NoReverseMatch): self.engine.render_to_string('url-fail12', {'named_url': 'no_such_view'}) - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url-fail13': '{% url named_url %}'}) def test_url_fail13(self): with self.assertRaises(NoReverseMatch): @@ -227,13 +227,13 @@ class UrlTagTests(SimpleTestCase): self.engine.render_to_string('url-fail19', {'named_url': 'view'}) # {% url ... as var %} - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url-asvar01': '{% url "template_tests.views.index" as url %}'}) def test_url_asvar01(self): output = self.engine.render_to_string('url-asvar01') self.assertEqual(output, '') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) @setup({'url-asvar02': '{% url "template_tests.views.index" as url %}{{ url }}'}) def test_url_asvar02(self): output = self.engine.render_to_string('url-asvar02') diff --git a/tests/template_tests/test_custom.py b/tests/template_tests/test_custom.py index fa485bb674..9130697c6a 100644 --- a/tests/template_tests/test_custom.py +++ b/tests/template_tests/test_custom.py @@ -7,7 +7,7 @@ from django.template.base import Node from django.test import SimpleTestCase, ignore_warnings from django.test.utils import extend_sys_path from django.utils import six -from django.utils.deprecation import RemovedInDjango20Warning +from django.utils.deprecation import RemovedInDjango110Warning from .templatetags import custom, inclusion from .utils import ROOT @@ -249,7 +249,7 @@ class CustomTagTests(SimpleTestCase): self.verify_tag(inclusion.inclusion_tag_current_app, 'inclusion_tag_current_app') self.verify_tag(inclusion.inclusion_unlimited_args_kwargs, 'inclusion_unlimited_args_kwargs') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) def test_15070_current_app(self): """ Test that inclusion tag passes down `current_app` of context to the diff --git a/tests/template_tests/test_engine.py b/tests/template_tests/test_engine.py index 77f3c995b5..03bbe55287 100644 --- a/tests/template_tests/test_engine.py +++ b/tests/template_tests/test_engine.py @@ -3,14 +3,14 @@ import os from django.template import Context from django.template.engine import Engine from django.test import SimpleTestCase, ignore_warnings -from django.utils.deprecation import RemovedInDjango20Warning +from django.utils.deprecation import RemovedInDjango110Warning from .utils import ROOT, TEMPLATE_DIR OTHER_DIR = os.path.join(ROOT, 'other_templates') -@ignore_warnings(category=RemovedInDjango20Warning) +@ignore_warnings(category=RemovedInDjango110Warning) class DeprecatedRenderToStringTest(SimpleTestCase): def setUp(self): @@ -100,7 +100,7 @@ class LoaderTests(SimpleTestCase): self.assertEqual(template.render(Context()), 'priority\n') -@ignore_warnings(category=RemovedInDjango20Warning) +@ignore_warnings(category=RemovedInDjango110Warning) class TemplateDirsOverrideTests(SimpleTestCase): DIRS = ((OTHER_DIR, ), [OTHER_DIR]) diff --git a/tests/template_tests/test_response.py b/tests/template_tests/test_response.py index 22863b49fc..69133b0708 100644 --- a/tests/template_tests/test_response.py +++ b/tests/template_tests/test_response.py @@ -13,7 +13,7 @@ from django.test import ( RequestFactory, SimpleTestCase, ignore_warnings, override_settings, ) from django.test.utils import require_jinja2 -from django.utils.deprecation import RemovedInDjango20Warning +from django.utils.deprecation import RemovedInDjango110Warning from .utils import TEMPLATE_DIR @@ -118,7 +118,7 @@ class SimpleTemplateResponseTest(SimpleTestCase): response.render() self.assertEqual(response.content, b'bar') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) def test_context_instance(self): response = self._response('{{ foo }}{{ processors }}', Context({'foo': 'bar'})) @@ -248,7 +248,7 @@ class TemplateResponseTest(SimpleTestCase): {'foo': 'bar'}).render() self.assertEqual(response.content, b'baryes') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) def test_render_with_context(self): response = self._response('{{ foo }}{{ processors }}', Context({'foo': 'bar'})).render() @@ -282,7 +282,7 @@ class TemplateResponseTest(SimpleTestCase): response = TemplateResponse(request, 'template_tests/using.html', using='jinja2').render() self.assertEqual(response.content, b'Jinja2\n') - @ignore_warnings(category=RemovedInDjango20Warning) + @ignore_warnings(category=RemovedInDjango110Warning) def test_custom_app(self): self._response('{{ foo }}', current_app="foobar") self.assertEqual(self._request.current_app, 'foobar') |
