def testWhitespace(self): feed_id = feed_identifier.identify(self.load('whitespace_id.xml'), 'atom') self.assertEquals('my feed id here', feed_id)
def testNoFeedId(self): feed_id = feed_identifier.identify(self.load('atom_no_id.xml'), 'atom') self.assertTrue(feed_id is None)
def testIncorrectFormat(self): feed_id = feed_identifier.identify(self.load('rss_rdf.xml'), 'atom') self.assertTrue(feed_id is None)
def testGood(self): feed_id = feed_identifier.identify(self.load('parsing.xml'), 'atom') self.assertEquals('tag:diveintomark.org,2001-07-29:/', feed_id)
def testGood20(self): feed_id = feed_identifier.identify(self.load('rss2sample.xml'), 'rss') self.assertEquals('http://liftoff.msfc.nasa.gov/', feed_id)
def testNoFeedId(self): feed_id = feed_identifier.identify(self.load('rss_no_link.xml'), 'rss') self.assertTrue(feed_id is None)
def testGood092(self): feed_id = feed_identifier.identify(self.load('sampleRss092.xml'), 'rss') self.assertEquals( 'http://www.scripting.com/blog/categories/gratefulDead.html', feed_id)
def testFullNamespace(self): feed_id = feed_identifier.identify(self.load('atom_namespace.xml'), 'atom') self.assertEquals('http://example.com/feeds/delta', feed_id)
def testGood091(self): feed_id = feed_identifier.identify(self.load('sampleRss091.xml'), 'rss') self.assertEquals('http://writetheweb.com', feed_id)
def testGoodRdf(self): feed_id = feed_identifier.identify(self.load('rss_rdf.xml'), 'rss') self.assertEquals('http://writetheweb.com', feed_id)
def testIncorrectFormat(self): feed_id = feed_identifier.identify(self.load('parsing.xml'), 'rss') self.assertTrue(feed_id is None)