]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Rename tests to avoid name collision 636/head
authorMiro Hrončok <miro@hroncok.cz>
Thu, 29 Dec 2016 13:28:38 +0000 (14:28 +0100)
committerMiro Hrončok <miro@hroncok.cz>
Thu, 29 Dec 2016 13:28:38 +0000 (14:28 +0100)
Previously, two tests where not executed because of name collision

tests/test_security.py

index b033864f0f9f6c50a8db6c0a8ea442de2cd7d8b4..c0442ce79bcb5c19ae4db835ffd330ae0e41b85c 100644 (file)
@@ -175,12 +175,12 @@ class TestStringFormat(object):
         t = env.from_string('{{ "a{0.foo}b".format({"foo": 42}) }}')
         assert t.render() == 'a42b'
 
-    def test_basic_format_safety(self):
+    def test_safe_format_safety(self):
         env = SandboxedEnvironment()
         t = env.from_string('{{ ("a{0.__class__}b{1}"|safe).format(42, "<foo>") }}')
         assert t.render() == 'ab&lt;foo&gt;'
 
-    def test_basic_format_all_okay(self):
+    def test_safe_format_all_okay(self):
         env = SandboxedEnvironment()
         t = env.from_string('{{ ("a{0.foo}b{1}"|safe).format({"foo": 42}, "<foo>") }}')
         assert t.render() == 'a42b&lt;foo&gt;'