diff options
| author | Carlton Gibson <carlton.gibson@noumenal.es> | 2020-07-29 10:30:55 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2020-07-29 11:48:29 +0200 |
| commit | 50e1ccbbea4c6f8e14a186149dd757483f0f0da5 (patch) | |
| tree | 94a10cd0738d4c333a4761cdb49bf15d2162f04d /tests/sitemaps_tests/test_generic.py | |
| parent | 948a874425e7d999950a8fa3b6598d9e34a4b861 (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_generic.py')
| -rw-r--r-- | tests/sitemaps_tests/test_generic.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/sitemaps_tests/test_generic.py b/tests/sitemaps_tests/test_generic.py index 141e2e2a39..0efdf4e61d 100644 --- a/tests/sitemaps_tests/test_generic.py +++ b/tests/sitemaps_tests/test_generic.py @@ -40,7 +40,7 @@ class GenericViewsSitemapTests(SitemapTestsBase): for pk in TestModel.objects.values_list("id", flat=True): expected += "<url><loc>%s/testmodel/%s/</loc></url>" % (self.base_url, pk) 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"> %s </urlset> """ % expected @@ -51,7 +51,7 @@ class GenericViewsSitemapTests(SitemapTestsBase): TestModel.objects.update(lastmod=datetime(2013, 3, 13, 10, 0, 0)) response = self.client.get('/generic-lastmod/sitemap.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/testmodel/%s/</loc><lastmod>2013-03-13</lastmod></url> </urlset> """ % (self.base_url, test_model.pk) |
