summaryrefslogtreecommitdiff
path: root/tests/sitemaps_tests/test_https.py
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2020-12-30 16:44:53 +0000
committerCarlton Gibson <carlton.gibson@noumenal.es>2021-10-21 15:26:22 +0200
commit480191244d12fefbf95854b2b117c71ffe44749a (patch)
treea6ef5bc394b5e66b09bcb43e13b53d0540ee6818 /tests/sitemaps_tests/test_https.py
parent2ce03a2bac9f41b803196a45dcd07cc342838e58 (diff)
Fixed #25916 -- Added lastmod support to sitemap index view.
Co-authored-by: Matthew Downey <matthew.downey@webit.com.au>
Diffstat (limited to 'tests/sitemaps_tests/test_https.py')
-rw-r--r--tests/sitemaps_tests/test_https.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/sitemaps_tests/test_https.py b/tests/sitemaps_tests/test_https.py
index 5c3f8894f8..1e8c28d6c3 100644
--- a/tests/sitemaps_tests/test_https.py
+++ b/tests/sitemaps_tests/test_https.py
@@ -14,9 +14,9 @@ class HTTPSSitemapTests(SitemapTestsBase):
response = self.client.get('/secure/index.xml')
expected_content = """<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
-<sitemap><loc>%s/secure/sitemap-simple.xml</loc></sitemap>
+<sitemap><loc>%s/secure/sitemap-simple.xml</loc><lastmod>%s</lastmod></sitemap>
</sitemapindex>
-""" % self.base_url
+""" % (self.base_url, date.today())
self.assertXMLEqual(response.content.decode(), expected_content)
def test_secure_sitemap_section(self):
@@ -39,9 +39,9 @@ class HTTPSDetectionSitemapTests(SitemapTestsBase):
response = self.client.get('/simple/index.xml', **self.extra)
expected_content = """<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
-<sitemap><loc>%s/simple/sitemap-simple.xml</loc></sitemap>
+<sitemap><loc>%s/simple/sitemap-simple.xml</loc><lastmod>%s</lastmod></sitemap>
</sitemapindex>
-""" % self.base_url.replace('http://', 'https://')
+""" % (self.base_url.replace('http://', 'https://'), date.today())
self.assertXMLEqual(response.content.decode(), expected_content)
def test_sitemap_section_with_https_request(self):