Esempio n. 1
0
 def testRssInitEntry(self):
     data = self.rssfeeddata["entries"][0]
     entry = createEntryFromData(data=data)
     self.assertEqual(entry.title, data["title"])
     self.assertEqual(entry.author, data["author"])
     self.assertEqual(entry.url, data["link"])
     self.assertEqual(entry.identity, data["id"])
     self.assertEqual(entry.updated, data["updated_parsed"])
     self.assertEqual(entry.content, data["summary"])
Esempio n. 2
0
 def testMissingDataEntry(self):
     data = {"bozo": 0}
     entry = createEntryFromData(data=data)
     self.assertEqual(entry.title, "No Title provided")
     self.assertEqual(entry.author, "No Author provided")
     self.assertEqual(entry.content, "No Content provided")
     self.assertIsNone(entry.updated)
     self.assertIsNone(entry.identity)
     self.assertIsNone(entry.url)