summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-15 11:13:22 (GMT)
committerGitHub <noreply@github.com>2023-06-15 11:13:22 (GMT)
commit3073e232291915e969af8f54653bf28256fc76b1 (patch)
tree291e694bb3dba6e43624cd19d3088d32b6d8a825 /Lib/test
parent9012c55af8877eedc0a35955b01281958703c6e2 (diff)
downloadcpython-3073e232291915e969af8f54653bf28256fc76b1.zip
cpython-3073e232291915e969af8f54653bf28256fc76b1.tar.gz
cpython-3073e232291915e969af8f54653bf28256fc76b1.tar.bz2
[3.12] gh-105821: Use a raw f-string in test_httpservers.py (GH-105822) (#105824)
gh-105821: Use a raw f-string in test_httpservers.py (GH-105822) Use a raw f-string in test_httpservers.py (cherry picked from commit 09ce8c3b48f940eb8865330f029b8069854c3106) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_httpservers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index cdd1bea..cfd8a10 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -442,10 +442,10 @@ class SimpleHTTPServerTestCase(BaseTestCase):
def test_undecodable_parameter(self):
# sanity check using a valid parameter
response = self.request(self.base_url + '/?x=123').read()
- self.assertRegex(response, f'listing for {self.base_url}/\?x=123'.encode('latin1'))
+ self.assertRegex(response, rf'listing for {self.base_url}/\?x=123'.encode('latin1'))
# now the bogus encoding
response = self.request(self.base_url + '/?x=%bb').read()
- self.assertRegex(response, f'listing for {self.base_url}/\?x=\xef\xbf\xbd'.encode('latin1'))
+ self.assertRegex(response, rf'listing for {self.base_url}/\?x=\xef\xbf\xbd'.encode('latin1'))
def test_get_dir_redirect_location_domain_injection_bug(self):
"""Ensure //evil.co/..%2f../../X does not put //evil.co/ in Location.