def test_objecttype_feed(self): original_feeds_format = feeds.FEEDS_FORMAT feeds.FEEDS_FORMAT = '' objecttype = self.create_published_objecttype() feed = ObjecttypeFeed() self.assertEquals(feed.item_pubdate(objecttype), objecttype.creation_date) self.assertEquals(feed.item_metatypes(objecttype), [self.metatype.title]) self.assertEquals(feed.item_author_name(objecttype), self.author.username) self.assertEquals(feed.item_author_email(objecttype), self.author.email) self.assertEquals( feed.item_author_link(objecttype), 'http://example.com/authors/%s/' % self.author.username) # Test a NoReverseMatch for item_author_link self.author.username = '******' self.author.save() feed.item_author_name(objecttype) self.assertEquals(feed.item_author_link(objecttype), 'http://example.com') feeds.FEEDS_FORMAT = original_feeds_format