Skip to content

Commit

Permalink
Fixed formatting error.
Browse files Browse the repository at this point in the history
  • Loading branch information
KyeRussell committed Feb 3, 2025
1 parent 375868f commit 05be7df
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions django_bleach/tests/test_templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_bleaching(self):
{"some_unsafe_content": '<script>alert("Hello World!")</script>'},
)
template_to_render = Template(
"{% load bleach_tags %}" "{{ some_unsafe_content|bleach }}"
"{% load bleach_tags %}{{ some_unsafe_content|bleach }}"
)
rendered_template = template_to_render.render(context)
self.assertInHTML(
Expand All @@ -23,7 +23,7 @@ def test_bleaching_none(self):
"""Test that None is handled properly as an input"""
context = Context({"none_value": None})
template_to_render = Template(
"{% load bleach_tags %}" "{{ none_value|bleach }}"
"{% load bleach_tags %}{{ none_value|bleach }}"
)
rendered_template = template_to_render.render(context)
self.assertEqual("None", rendered_template)
Expand All @@ -34,8 +34,7 @@ def test_bleaching_tags(self):
{"some_unsafe_content": '<script>alert("Hello World!")</script>'}
)
template_to_render = Template(
"{% load bleach_tags %}"
'{{ some_unsafe_content|bleach:"script" }}'
'{% load bleach_tags %}{{ some_unsafe_content|bleach:"script" }}'
)
rendered_template = template_to_render.render(context)
self.assertInHTML(
Expand All @@ -47,7 +46,7 @@ def test_linkify(self):
url = "www.google.com"
context = Context({"link_this": url})
template_to_render = Template(
"{% load bleach_tags %}" "{{ link_this|bleach_linkify|safe }}"
"{% load bleach_tags %}{{ link_this|bleach_linkify|safe }}"
)
rendered_template = template_to_render.render(context)
self.assertInHTML(
Expand All @@ -59,7 +58,7 @@ def test_linkify_none(self):
"""Test bleach linkify with None as an input"""
context = Context({"none_value": None})
template_to_render = Template(
"{% load bleach_tags %}" "{{ none_value|bleach_linkify }}"
"{% load bleach_tags %}{{ none_value|bleach_linkify }}"
)
rendered_template = template_to_render.render(context)
self.assertEqual(
Expand Down

0 comments on commit 05be7df

Please sign in to comment.