#NEWLINE# def test_10_sitemap( self ) : #NEWLINE# #INDENT# xml = '<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:rs="http://www.openarchives.org/rs/terms/"><url><loc>http://e.com/a</loc><lastmod>2012-03-14T18:37:36Z</lastmod><rs:md hash="md5:Q2hlY2sgSW50ZWdyaXR5IQ==" length="12" /></url></urlset>' #NEWLINE# s = Sitemap ( ) #NEWLINE# i = s . parse_xml ( fh = io . StringIO ( xml ) ) #NEWLINE# self . assertFalse ( s . parsed_index , 'was a sitemap' ) #NEWLINE# self . assertEqual ( s . resources_created , 1 , 'got 1 resources' ) #NEWLINE# for r in i . resources : #NEWLINE# #INDENT# self . assertTrue ( ( r is not None ) , 'got the uri expected' ) #NEWLINE# self . assertEqual ( r . uri , 'http://e.com/a' ) #NEWLINE# self . assertEqual ( r . lastmod , '2012-03-14T18:37:36Z' ) #NEWLINE# self . assertEqual ( r . length , 12 ) #NEWLINE# self . assertEqual ( r . md5 , 'Q2hlY2sgSW50ZWdyaXR5IQ==' )