summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_httpservers.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-02-16 01:06:00 (GMT)
committerGitHub <noreply@github.com>2024-02-16 01:06:00 (GMT)
commit6091fbda8bceda96a915deb4493bf8d73df67c01 (patch)
tree81e988f0c19b214e4f036740e0e3b381c19aba9a /Lib/test/test_httpservers.py
parent0e7ff84038d958810b3b4e319ee5e7576ff1ae68 (diff)
downloadcpython-6091fbda8bceda96a915deb4493bf8d73df67c01.zip
cpython-6091fbda8bceda96a915deb4493bf8d73df67c01.tar.gz
cpython-6091fbda8bceda96a915deb4493bf8d73df67c01.tar.bz2
[3.10] gh-105821: Use a raw f-string in test_httpservers.py (GH-105822) (#115519)
Diffstat (limited to 'Lib/test/test_httpservers.py')
-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 66ab064..10a50fe 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -420,10 +420,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.