#NEWLINE# def test_03_resource_str_hashes( self ) : #NEWLINE# #INDENT# r1 = Resource ( '03hashes' , 1234.1 ) #NEWLINE# r1 . md5 = 'aaa' #NEWLINE# r1 . sha1 = 'bbb' #NEWLINE# self . assertEqual ( Sitemap ( ) . resource_as_xml ( self ) , '<url><loc>03hashes</loc><lastmod>1970-01-01T00:20:34.100000Z</lastmod><rs:md hash="md5:aaa sha-1:bbb" /></url>' ) #NEWLINE# r1 . sha256 = 'ccc' #NEWLINE# self . assertEqual ( Sitemap ( ) . resource_as_xml ( r1 ) , '<url><loc>03hashes</loc><lastmod>1970-01-01T00:20:34.100000Z</lastmod><rs:md hash="md5:aaa sha-1:bbb sha-256:ccc" /></url>' ) #NEWLINE# r1 . sha1 = None #NEWLINE# self . assertEqual ( Sitemap ( ) . resource_as_xml ( r1 ) , '<url><loc>03hashes</loc><lastmod>1970-01-01T00:20:34.100000Z</lastmod><rs:md hash="md5:aaa sha-256:ccc" /></url>' )