Exemple #1
0
 def test_longer_real_world_text(self):
     self.assertEquals(clean_html("<p><strong><em>Laughter Against The Machine</em></strong> is a seven part documentary series following comedians W. Kamau Bell, Nato Green, and Janine Brito as they journey across the U.S. in 2011 before and after Occupy protests rock the nation.</p><p>The trio visits some of the least funny places in the world, like the militarized US/Mexico border, the 9th Ward in New Orleans that was devastated by Hurricane Katrina, or Oakland under martial law during Occupy. Amidst this grim political backdrop, the comics try and help their audiences unwind between being teargassed by cops or arrested for blocking ICE deportations.</p><p><br></p><p>Released in 2020</p>"),
                       "Laughter Against The Machine is a seven part documentary series following comedians W. Kamau Bell, Nato Green, and Janine Brito as they journey across the U.S. in 2011 before and after Occupy protests rock the nation. The trio visits some of the least funny places in the world, like the militarized US/Mexico border, the 9th Ward in New Orleans that was devastated by Hurricane Katrina, or Oakland under martial law during Occupy. Amidst this grim political backdrop, the comics try and help their audiences unwind between being teargassed by cops or arrested for blocking ICE deportations. Released in 2020")
Exemple #2
0
 def test_for_none_returns_none(self):
     self.assertEquals(clean_html(None), None)
Exemple #3
0
 def test_with_tags_returns_string_without_tags_separates_by_single_space(self):
     self.assertEquals(clean_html("<h1>headline</h1><p>something <b>with</b> <i>tags</i></p>"),
                       "headline something with tags")
Exemple #4
0
 def test_with_tags_returns_string_without_tags(self):
     self.assertEquals(clean_html("<p>something</p>"), "something")
Exemple #5
0
 def test_without_tags_returns_same_string(self):
     self.assertEquals(clean_html("No tags at all"), "No tags at all")
Exemple #6
0
 def test_for_empty_string_returns_empty_string(self):
     self.assertEquals(clean_html(""), "")
Exemple #7
0
 def clean_description(self):
     """
     :return: description without html markup
     """
     return formatting.clean_html(self.description)