#NEWLINE# def test_13_parse_multi_lastmod( self ) : #NEWLINE# #INDENT# xml_start = '<?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>uri:a</loc>' #NEWLINE# xml_end = '</url></urlset>' #NEWLINE# s = Sitemap ( ) #NEWLINE# two_lastmod = '<lastmod>2013-01-01</lastmod><lastmod>2013-01-02</lastmod>' #NEWLINE# self . assertRaises ( SitemapParseError , s . parse_xml , io . StringIO ( ( ( xml_start + two_lastmod ) + xml_end ) ) ) #NEWLINE# mt_lastmod = '<lastmod></lastmod>' #NEWLINE# i = s . parse_xml ( fh = io . StringIO ( ( ( xml_start + mt_lastmod ) + xml_end ) ) ) #NEWLINE# self . assertEqual ( s . resources_created , 1 ) #NEWLINE# self . assertEqual ( i . resources [ 0 ] . lastmod , None ) #NEWLINE# mt_lastmod_att = '<lastmod att="value"/>' #NEWLINE# i = s . parse_xml ( fh = io . StringIO ( ( ( xml_start + mt_lastmod_att ) + xml_end ) ) ) #NEWLINE# self . assertEqual ( s . resources_created , 1 ) #NEWLINE# self . assertEqual ( i . resources [ 0 ] . lastmod , None )