def retrieve_content(self, title=False): d = retrieve_doc_content(self.doc_id) self.content_text = d['text'] self.content_html = d['html'] if title: self.title = d['title'] return d
def test_retrieve(self): doc_id="186WhJNI4Z-2gU_lakB2kbuUC-lQ8zG9Nz9bK8sk3Ykg" d = retrieve_doc_content(doc_id) self.assertIn("123", d['title']) self.assertIn("123", d['text']) self.assertIn("<html", d['html'])