summaryrefslogtreecommitdiff
path: root/tests/test_security.py
diff options
context:
space:
mode:
authorMiro Hrončok <miro@hroncok.cz>2016-12-29 14:28:38 +0100
committerMiro Hrončok <miro@hroncok.cz>2016-12-29 14:28:38 +0100
commitba7cba0a4e9cab4eaa05c2ef968461a086ab5030 (patch)
tree5fe93ce03621424a10fbbfe5f87f8ee29e2a3efd /tests/test_security.py
parent3097b97ef34a4d00f5bc94738bf654b4dfbe8e35 (diff)
downloadjinja2-ba7cba0a4e9cab4eaa05c2ef968461a086ab5030.tar.gz
Rename tests to avoid name collision
Previously, two tests where not executed because of name collision
Diffstat (limited to 'tests/test_security.py')
-rw-r--r--tests/test_security.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_security.py b/tests/test_security.py
index b033864..c0442ce 100644
--- a/tests/test_security.py
+++ b/tests/test_security.py
@@ -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;'