summaryrefslogtreecommitdiff
path: root/tests/sitemaps_tests/test_https.py
diff options
context:
space:
mode:
authorSaJH <wogur981208@gmail.com>2024-10-16 01:11:46 +0900
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-10-16 11:52:22 +0200
commit0c8177551500e960d2dc04bc4b0fa7060f9172ae (patch)
tree1453b4739431a2efeebd2d2db4f9141e1d064769 /tests/sitemaps_tests/test_https.py
parent4a685bc0dca5298a7d5a4e162120a90cac7fd1a4 (diff)
Refs #35727 -- Updated response.content.decode calls to use the HttpResponse.text property.
Signed-off-by: SaJH <wogur981208@gmail.com>
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 2eae71e4cc..a5369869f9 100644
--- a/tests/sitemaps_tests/test_https.py
+++ b/tests/sitemaps_tests/test_https.py
@@ -20,7 +20,7 @@ class HTTPSSitemapTests(SitemapTestsBase):
self.base_url,
date.today(),
)
- self.assertXMLEqual(response.content.decode(), expected_content)
+ self.assertXMLEqual(response.text, expected_content)
def test_secure_sitemap_section(self):
"A secure sitemap section can be rendered"
@@ -36,7 +36,7 @@ class HTTPSSitemapTests(SitemapTestsBase):
self.base_url,
date.today(),
)
- self.assertXMLEqual(response.content.decode(), expected_content)
+ self.assertXMLEqual(response.text, expected_content)
@override_settings(SECURE_PROXY_SSL_HEADER=False)
@@ -54,7 +54,7 @@ class HTTPSDetectionSitemapTests(SitemapTestsBase):
self.base_url.replace("http://", "https://"),
date.today(),
)
- self.assertXMLEqual(response.content.decode(), expected_content)
+ self.assertXMLEqual(response.text, expected_content)
def test_sitemap_section_with_https_request(self):
"A sitemap section requested in HTTPS is rendered with HTTPS links"
@@ -70,4 +70,4 @@ class HTTPSDetectionSitemapTests(SitemapTestsBase):
self.base_url.replace("http://", "https://"),
date.today(),
)
- self.assertXMLEqual(response.content.decode(), expected_content)
+ self.assertXMLEqual(response.text, expected_content)