class TestSyndicationFeedAdapter(BaseSyndicationTest): layer = INTEGRATION_TESTING def setUp(self): super(TestSyndicationFeedAdapter, self).setUp() self.feed = IFeed(self.folder) self.feeddatadoc = BaseItem(self.doc1, self.feed) self.feeddatafile = BaseItem(self.file, self.feed) def test_link_on_folder(self): self.assertEqual(self.feed.link, self.folder.absolute_url()) def test_link_on_file(self): self.assertEqual(self.feeddatafile.link, self.file.absolute_url() + '/view') def test_items(self): self.assertEqual(len(self.feed._brains()), 3) self.assertEqual(len([i for i in self.feed.items]), 3) def test_has_enclosure(self): self.assertEqual(self.feeddatadoc.has_enclosure, False) self.assertEqual(self.feeddatafile.has_enclosure, True)
def setUp(self): super(TestSyndicationFeedAdapter, self).setUp() self.feed = IFeed(self.folder) self.feeddatadoc = BaseItem(self.doc1, self.feed) self.feeddatafile = BaseItem(self.file, self.feed)