示例#1
0
 def testSave(self):
     entry = Entry()
     store = StoreMock()
     self.savefeed.entries.append(entry)
     self.savefeed.save(store)
     self.assertEqual(len(store.childGroups()), 1)
     self.assertEqual(self.savefeed.title, store.value("Title"))
     self.assertEqual(self.savefeed.author, store.value("Author"))
     self.assertEqual(self.savefeed.url, store.value("Url"))
     self.assertEqual(self.savefeed.updated, store.value("Updated"))
     self.assertEqual(self.savefeed.deleted_entry_ids, store.value("DeletedEntryIds", []))
示例#2
0
 def testSave(self):
     store = StoreMock()
     self.saveentry.save(store)
     self.assertEqual(store.value("Title"), self.saveentry.title)
     self.assertEqual(store.value("Url"), self.saveentry.url)
     self.assertEqual(store.value("Author"), self.saveentry.author)
     self.assertEqual(store.value("Content"), self.saveentry.content)
     self.assertEqual(store.value("Updated"), self.saveentry.updated)
     self.assertEqual(store.value("Id"), self.saveentry.identity)
     self.assertEqual(store.value("Read"), self.saveentry.read)
     self.assertEqual(store.value("Important"), self.saveentry.important)