|
|
|
@ -41,7 +41,7 @@ class TestArticleOnly(unittest.TestCase):
|
|
|
|
|
"""We should parse the doc and get a full summary with confidence"""
|
|
|
|
|
sample = load_sample('si-game.sample.html')
|
|
|
|
|
doc = Document(sample, url='http://sportsillustrated.cnn.com/baseball/mlb/gameflash/2012/04/16/40630_preview.html')
|
|
|
|
|
res = doc.get_summary_with_metadata(enclose_with_html_tag=False)
|
|
|
|
|
res = doc.summary_with_metadata(enclose_with_html_tag=False)
|
|
|
|
|
self.assertTrue(hasattr(res, 'html'), 'res should have an html attrib')
|
|
|
|
|
self.assertTrue(hasattr(res, 'confidence'), 'res should have an html attrib')
|
|
|
|
|
self.assertEqual('<div><div class="', res.html[0:17])
|
|
|
|
|