diff options
| author | Tim Graham <timograham@gmail.com> | 2016-12-19 13:44:02 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-12-19 16:18:06 -0500 |
| commit | 1a04b1762b50ea4d09eb1dc192d57172750b80aa (patch) | |
| tree | 43e17ae389d6646d4476c6c0508dae545d517f44 /tests/template_tests/syntax_tests | |
| parent | e233f357bd463df519ca5cd01106f1f59fb5733d (diff) | |
Refs #25484 -- Made non-staticfiles {% static %} tag quote its output.
Diffstat (limited to 'tests/template_tests/syntax_tests')
| -rw-r--r-- | tests/template_tests/syntax_tests/test_static.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/template_tests/syntax_tests/test_static.py b/tests/template_tests/syntax_tests/test_static.py index d5ca9ecf60..deb0ce6c78 100644 --- a/tests/template_tests/syntax_tests/test_static.py +++ b/tests/template_tests/syntax_tests/test_static.py @@ -51,13 +51,7 @@ class StaticTagTests(SimpleTestCase): output = self.engine.render_to_string('static-statictag04', {'base_css': 'admin/base.css'}) self.assertEqual(output, urljoin(settings.STATIC_URL, 'admin/base.css')) - @setup({'static-statictag05': '{% load static %}{% static "test.html?foo=1&bar=2" %}'}) - def test_static_escapes_urls(self): + @setup({'static-statictag05': '{% load static %}{% static "special?chars"ed.html" %}'}) + def test_static_quotes_urls(self): output = self.engine.render_to_string('static-statictag05') - self.assertEqual(output, urljoin(settings.STATIC_URL, '/static/test.html?foo=1&bar=2')) - - @setup({'static-statictag06': '{% load static %}' - '{% autoescape off %}{% static "test.html?foo=1&bar=2" %}{% endautoescape %}'}) - def test_static_escapes_urls_autoescape_off(self): - output = self.engine.render_to_string('static-statictag06') - self.assertEqual(output, urljoin(settings.STATIC_URL, '/static/test.html?foo=1&bar=2')) + self.assertEqual(output, urljoin(settings.STATIC_URL, '/static/special%3Fchars%26quoted.html')) |
