#NEWLINE# def test_30_parse_change_list( 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>/tmp/rs_test/src/file_a</loc><lastmod>2012-03-14T18:37:36Z</lastmod><rs:md change="updated" length="12" /></url><url><loc>/tmp/rs_test/src/file_b</loc><lastmod>2012-03-14T18:37:36Z</lastmod><rs:md length="32" /></url></urlset>' #NEWLINE# s = Sitemap ( ) #NEWLINE# s . resource_class = Resource #NEWLINE# c = s . parse_xml ( fh = io . StringIO ( xml ) ) #NEWLINE# self . assertEqual ( s . resources_created , 2 , 'got 2 resources' ) #NEWLINE# i = iter ( c ) #NEWLINE# r1 = next ( i ) #NEWLINE# self . assertEqual ( r1 . uri , '/tmp/rs_test/src/file_a' ) #NEWLINE# self . assertEqual ( r1 . change , 'updated' ) #NEWLINE# r2 = next ( i ) #NEWLINE# self . assertEqual ( r2 . uri , '/tmp/rs_test/src/file_b' ) #NEWLINE# self . assertEqual ( r2 . change , None )