예제 #1
0
 def scrub(self):
     """Removes internal editorial markers.
     Must be run on a full (non-list) Page object.
     TODO Should this happen upon import from MediaWiki?
     """
     if (not settings.DEBUG) and hasattr(self,'body') and self.body:
         self.body = unicode(remove_status_markers(BeautifulSoup(self.body)))
예제 #2
0
파일: tests.py 프로젝트: densho/encyc-front
 def test_remove_status_markers(self):
     soup = mw.remove_status_markers(self.soup)
     html = unicode(soup)
     self.assertEqual(-1, html.find('class="alert'))