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)))
def test_remove_status_markers(self): soup = mw.remove_status_markers(self.soup) html = unicode(soup) self.assertEqual(-1, html.find('class="alert'))