mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Fixed test from refs #23913 when running tests in reverse.
This commit is contained in:
parent
26a92619f6
commit
9f51d0c86d
@ -2,6 +2,7 @@ import warnings
|
|||||||
|
|
||||||
from django.template import TemplateSyntaxError
|
from django.template import TemplateSyntaxError
|
||||||
from django.test import ignore_warnings, SimpleTestCase
|
from django.test import ignore_warnings, SimpleTestCase
|
||||||
|
from django.test.utils import reset_warning_registry
|
||||||
from django.utils.deprecation import RemovedInDjango20Warning
|
from django.utils.deprecation import RemovedInDjango20Warning
|
||||||
|
|
||||||
from ..utils import setup, TestObj
|
from ..utils import setup, TestObj
|
||||||
@ -528,6 +529,7 @@ class IfTagTests(SimpleTestCase):
|
|||||||
@setup({'if-tag-eq-deprecated': '{% if foo = bar %}yes{% else %}no{% endif %}'},
|
@setup({'if-tag-eq-deprecated': '{% if foo = bar %}yes{% else %}no{% endif %}'},
|
||||||
test_once=True)
|
test_once=True)
|
||||||
def test_if_tag_eq_deprecated(self):
|
def test_if_tag_eq_deprecated(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('if-tag-eq-deprecated')
|
output = self.engine.render_to_string('if-tag-eq-deprecated')
|
||||||
|
Loading…
Reference in New Issue
Block a user