#NEWLINE# def test_08_print( self ) : #NEWLINE# #INDENT# r1 = Resource ( uri = 'a' , lastmod = '2001-01-01' , length = 1234 ) #NEWLINE# r2 = Resource ( uri = 'b' , lastmod = '2002-02-02' , length = 56789 ) #NEWLINE# r3 = Resource ( uri = 'c' , lastmod = '2003-03-03' , length = 0 ) #NEWLINE# m = ResourceList ( md = { #NEWLINE# #INDENT# 'capability' : 'resourcelist' , #NEWLINE# 'modified' : None , #NEWLINE# #UNINDENT# } ) #NEWLINE# m . add ( r1 ) #NEWLINE# m . add ( r2 ) #NEWLINE# m . add ( r3 ) #NEWLINE# self . assertEqual ( Sitemap ( ) . resources_as_xml ( m ) , '<?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/"><rs:md capability="resourcelist" /><url><loc>a</loc><lastmod>2001-01-01T00:00:00Z</lastmod><rs:md length="1234" /></url><url><loc>b</loc><lastmod>2002-02-02T00:00:00Z</lastmod><rs:md length="56789" /></url><url><loc>c</loc><lastmod>2003-03-03T00:00:00Z</lastmod><rs:md length="0" /></url></urlset>' )