summaryrefslogtreecommitdiff
path: root/tests/sitemaps_tests/test_https.py
diff options
context:
space:
mode:
authorCarlton Gibson <carlton.gibson@noumenal.es>2020-07-29 10:30:55 +0200
committerCarlton Gibson <carlton@noumenal.es>2020-07-29 11:48:29 +0200
commit50e1ccbbea4c6f8e14a186149dd757483f0f0da5 (patch)
tree94a10cd0738d4c333a4761cdb49bf15d2162f04d /tests/sitemaps_tests/test_https.py
parent948a874425e7d999950a8fa3b6598d9e34a4b861 (diff)
Refs #27395 -- Added XML namespace declaration to sitemap template.
As per Google recommendations: https://support.google.com/webmasters/answer/189077?hl=en
Diffstat (limited to 'tests/sitemaps_tests/test_https.py')
-rw-r--r--tests/sitemaps_tests/test_https.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/sitemaps_tests/test_https.py b/tests/sitemaps_tests/test_https.py
index c0e21a6258..5c3f8894f8 100644
--- a/tests/sitemaps_tests/test_https.py
+++ b/tests/sitemaps_tests/test_https.py
@@ -23,7 +23,7 @@ class HTTPSSitemapTests(SitemapTestsBase):
"A secure sitemap section can be rendered"
response = self.client.get('/secure/sitemap-simple.xml')
expected_content = """<?xml version="1.0" encoding="UTF-8"?>
-<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url><loc>%s/location/</loc><lastmod>%s</lastmod><changefreq>never</changefreq><priority>0.5</priority></url>
</urlset>
""" % (self.base_url, date.today())
@@ -48,7 +48,7 @@ class HTTPSDetectionSitemapTests(SitemapTestsBase):
"A sitemap section requested in HTTPS is rendered with HTTPS links"
response = self.client.get('/simple/sitemap-simple.xml', **self.extra)
expected_content = """<?xml version="1.0" encoding="UTF-8"?>
-<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
+<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url><loc>%s/location/</loc><lastmod>%s</lastmod><changefreq>never</changefreq><priority>0.5</priority></url>
</urlset>
""" % (self.base_url.replace('http://', 'https://'), date.today())