Skip to content

Commit 6091fbd

Browse files
[3.10] gh-105821: Use a raw f-string in test_httpservers.py (GH-105822) (#115519)
1 parent 0e7ff84 commit 6091fbd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_httpservers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,10 @@ def test_undecodable_filename(self):
420420
def test_undecodable_parameter(self):
421421
# sanity check using a valid parameter
422422
response = self.request(self.base_url + '/?x=123').read()
423-
self.assertRegex(response, f'listing for {self.base_url}/\?x=123'.encode('latin1'))
423+
self.assertRegex(response, rf'listing for {self.base_url}/\?x=123'.encode('latin1'))
424424
# now the bogus encoding
425425
response = self.request(self.base_url + '/?x=%bb').read()
426-
self.assertRegex(response, f'listing for {self.base_url}/\?x=\xef\xbf\xbd'.encode('latin1'))
426+
self.assertRegex(response, rf'listing for {self.base_url}/\?x=\xef\xbf\xbd'.encode('latin1'))
427427

428428
def test_get_dir_redirect_location_domain_injection_bug(self):
429429
"""Ensure //evil.co/..%2f../../X does not put //evil.co/ in Location.

0 commit comments

Comments
 (0)