mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Renamed RemovedInDjangoXYWarnings for new roadmap.
Forwardport of ae1d663b79
from stable/1.8.x plus more.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -58,26 +58,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': '<'})
|
||||
|
||||
Reference in New Issue
Block a user