#NEWLINE# @ override_settings ( TEMPLATE_DIRS = ( os . path . join ( os . path . dirname ( upath ( __file__ ) ) , 'templates' ) , ) ) #NEWLINE# def test_simple_sitemap_custom_index( self ) : #NEWLINE# #INDENT# 'A simple sitemap index can be rendered with a custom template' #NEWLINE# response = self . client . get ( '/simple/custom-index.xml' ) #NEWLINE# expected_content = ( '<?xml version="1.0" encoding="UTF-8"?>\n<!-- This is a customised template -->\n<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n<sitemap><loc>%s/simple/sitemap-simple.xml</loc></sitemap>\n</sitemapindex>\n' % self . base_url ) #NEWLINE# self . assertXMLEqual ( response . content . decode ( 'utf-8' ) , expected_content )