]> git.scottworley.com Git - paperdoorknob/blobdiff - domfilter_test.py
Always have Thread.__init__ fetch the HTML
[paperdoorknob] / domfilter_test.py
index 8daca20685dd0ba3ed04b3b1a82e9135ff42b9f3..02c33ac7d2885c9b1cddd5231417343e0c2a9ff0 100644 (file)
@@ -15,33 +15,12 @@ from domfilter import ApplyDOMFilters
 class TestDOMFilters(unittest.TestCase):
 
     def setUp(self) -> None:
-        self._html = BeautifulSoup(b'''
-            <div class="post-container post-post">
-              <div class="post-edit-box">This is the edit box</div>
-              This is glowfic
-              <div class="post-footer">This is the footer</div>
-            </div>''', 'html.parser')
         self._strike = BeautifulSoup(b'''
             <div class="post-content">
               <p><span style="text-decoration: line-through;">Abandon hope and endure.</span></p>
               <p>No. Win.</p>
             </div>''', 'html.parser')
 
-    def testStripFooters(self) -> None:
-        ApplyDOMFilters("NoFooter", self._html)
-        self.assertEqual(list(self._html.stripped_strings),
-                         ["This is the edit box", "This is glowfic"])
-
-    def testStripEditBoxes(self) -> None:
-        ApplyDOMFilters("NoEdit", self._html)
-        self.assertEqual(list(self._html.stripped_strings),
-                         ["This is glowfic", "This is the footer"])
-
-    def testStripFootersAndEditBoxes(self) -> None:
-        ApplyDOMFilters("NoEdit,NoFooter", self._html)
-        self.assertEqual(list(self._html.stripped_strings),
-                         ["This is glowfic"])
-
     def testStrike(self) -> None:
         ApplyDOMFilters('Strike', self._strike)
         s = self._strike.find_all('s')