Skip to content
Myr

Merge pull request #636 from hroncok/tests_rename

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Rename tests to avoid name collision

authored by Armin Ronacher · committed by GitHub · parents 3097b97, ba7cba0 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • tests:+2 added−2 removed

1 file+2 added−2 removed

modified:tests/test_security.py+2 added-2 removed
173 unmodified lines
174 env = SandboxedEnvironment()175 t = env.from_string('{{ "a{0.foo}b".format({"foo": 42}) }}')176 assert t.render() == 'a42b'177178 def test_basic_format_safety(self):178 def test_safe_format_safety(self):179 env = SandboxedEnvironment()180 t = env.from_string('{{ ("a{0.__class__}b{1}"|safe).format(42, "<foo>") }}')181 assert t.render() == 'ab&lt;foo&gt;'182183 def test_basic_format_all_okay(self):183 def test_safe_format_all_okay(self):184 env = SandboxedEnvironment()185 t = env.from_string('{{ ("a{0.foo}b{1}"|safe).format({"foo": 42}, "<foo>") }}')186 assert t.render() == 'a42b&lt;foo&gt;'