mirror of https://github.com/django/django.git
Refs #24046 -- Fixed a template test when run in reverse.
This commit is contained in:
parent
baf3ec2e29
commit
60b095cc4c
|
@ -1,6 +1,7 @@
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from django.test import SimpleTestCase, ignore_warnings
|
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 RemovedInDjango20Warning
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
|
|
||||||
|
@ -41,6 +42,7 @@ class ChainingTests(SimpleTestCase):
|
||||||
# Using a filter that forces safeness does not lead to double-escaping
|
# Using a filter that forces safeness does not lead to double-escaping
|
||||||
@setup({'chaining05': '{{ a|escape|capfirst }}'})
|
@setup({'chaining05': '{{ a|escape|capfirst }}'})
|
||||||
def test_chaining05(self):
|
def test_chaining05(self):
|
||||||
|
reset_warning_registry()
|
||||||
with warnings.catch_warnings(record=True) as warns:
|
with warnings.catch_warnings(record=True) as warns:
|
||||||
warnings.simplefilter('always')
|
warnings.simplefilter('always')
|
||||||
output = self.engine.render_to_string('chaining05', {'a': 'a < b'})
|
output = self.engine.render_to_string('chaining05', {'a': 'a < b'})
|
||||||
|
|
Loading…
Reference in New Issue