New version of black, new whitespace
This commit is contained in:
@ -5,10 +5,10 @@ from bookwyrm.sanitize_html import InputHtmlParser
|
||||
|
||||
|
||||
class Sanitizer(TestCase):
|
||||
""" sanitizer tests """
|
||||
"""sanitizer tests"""
|
||||
|
||||
def test_no_html(self):
|
||||
""" just text """
|
||||
"""just text"""
|
||||
input_text = "no html "
|
||||
parser = InputHtmlParser()
|
||||
parser.feed(input_text)
|
||||
@ -16,7 +16,7 @@ class Sanitizer(TestCase):
|
||||
self.assertEqual(input_text, output)
|
||||
|
||||
def test_valid_html(self):
|
||||
""" leave the html untouched """
|
||||
"""leave the html untouched"""
|
||||
input_text = "<b>yes </b> <i>html</i>"
|
||||
parser = InputHtmlParser()
|
||||
parser.feed(input_text)
|
||||
@ -24,7 +24,7 @@ class Sanitizer(TestCase):
|
||||
self.assertEqual(input_text, output)
|
||||
|
||||
def test_valid_html_attrs(self):
|
||||
""" and don't remove attributes """
|
||||
"""and don't remove attributes"""
|
||||
input_text = '<a href="fish.com">yes </a> <i>html</i>'
|
||||
parser = InputHtmlParser()
|
||||
parser.feed(input_text)
|
||||
@ -32,7 +32,7 @@ class Sanitizer(TestCase):
|
||||
self.assertEqual(input_text, output)
|
||||
|
||||
def test_invalid_html(self):
|
||||
""" remove all html when the html is malformed """
|
||||
"""remove all html when the html is malformed"""
|
||||
input_text = "<b>yes <i>html</i>"
|
||||
parser = InputHtmlParser()
|
||||
parser.feed(input_text)
|
||||
@ -46,7 +46,7 @@ class Sanitizer(TestCase):
|
||||
self.assertEqual("yes html ", output)
|
||||
|
||||
def test_disallowed_html(self):
|
||||
""" remove disallowed html but keep allowed html """
|
||||
"""remove disallowed html but keep allowed html"""
|
||||
input_text = "<div> yes <i>html</i></div>"
|
||||
parser = InputHtmlParser()
|
||||
parser.feed(input_text)
|
||||
|
Reference in New Issue
Block a user