code style reformatting using black
This commit is contained in:
parent
4127bcffd0
commit
744cb0c503
1 changed files with 21394 additions and 10488 deletions
|
|
@ -91,10 +91,14 @@ class SanitisationTest(helpers.SatTestCase):
|
|||
def test_html2text(self):
|
||||
"""Check that html2text is not inserting \n in the middle of that link.
|
||||
By default lines are truncated after the 79th characters."""
|
||||
source = "<img src=\"http://sat.goffi.org/static/images/screenshots/libervia/libervia_discussions.png\" alt=\"sat\"/>"
|
||||
source = '<img src="http://sat.goffi.org/static/images/screenshots/libervia/libervia_discussions.png" alt="sat"/>'
|
||||
expected = ""
|
||||
try:
|
||||
d = self.text_syntaxes.convert(source, self.text_syntaxes.SYNTAX_XHTML, self.text_syntaxes.SYNTAX_MARKDOWN)
|
||||
d = self.text_syntaxes.convert(
|
||||
source,
|
||||
self.text_syntaxes.SYNTAX_XHTML,
|
||||
self.text_syntaxes.SYNTAX_MARKDOWN,
|
||||
)
|
||||
except plugin_misc_text_syntaxes.UnknownSyntax:
|
||||
raise SkipTest("Markdown syntax is not available.")
|
||||
d.addCallback(self.assertEqual, expected)
|
||||
|
|
@ -108,4 +112,3 @@ class SanitisationTest(helpers.SatTestCase):
|
|||
expected = u"""test retest toto"""
|
||||
result = self.text_syntaxes._removeMarkups(self.EVIL_HTML2)
|
||||
self.assertEqual(re.sub(r"\s+", " ", result).rstrip(), expected.rstrip())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue