mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #33476 -- Refactored code to strictly match 88 characters line length.
This commit is contained in:
@@ -122,10 +122,12 @@ class TestUtilsText(SimpleTestCase):
|
||||
|
||||
def test_truncate_html_words(self):
|
||||
truncator = text.Truncator(
|
||||
'<p id="par"><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>'
|
||||
'<p id="par"><strong><em>The quick brown fox jumped over the lazy dog.</em>'
|
||||
"</strong></p>"
|
||||
)
|
||||
self.assertEqual(
|
||||
'<p id="par"><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>',
|
||||
'<p id="par"><strong><em>The quick brown fox jumped over the lazy dog.</em>'
|
||||
"</strong></p>",
|
||||
truncator.words(10, html=True),
|
||||
)
|
||||
self.assertEqual(
|
||||
@@ -143,7 +145,8 @@ class TestUtilsText(SimpleTestCase):
|
||||
|
||||
# Test with new line inside tag
|
||||
truncator = text.Truncator(
|
||||
'<p>The quick <a href="xyz.html"\n id="mylink">brown fox</a> jumped over the lazy dog.</p>'
|
||||
'<p>The quick <a href="xyz.html"\n id="mylink">brown fox</a> jumped over '
|
||||
"the lazy dog.</p>"
|
||||
)
|
||||
self.assertEqual(
|
||||
'<p>The quick <a href="xyz.html"\n id="mylink">brown…</a></p>',
|
||||
|
||||
Reference in New Issue
Block a user