Skip to content

Commit ed749be

Browse files
[3.11] gh-105821: Use a raw f-string in test_httpservers.py (GH-105822) (#108576)
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 09ce8c3) Co-authored-by: Pablo Galindo Salgado <[email protected]>
1 parent 33eee43 commit ed749be

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
@@ -442,10 +442,10 @@ def test_undecodable_filename(self):
442442
def test_undecodable_parameter(self):
443443
# sanity check using a valid parameter
444444
response = self.request(self.base_url + '/?x=123').read()
445-
self.assertRegex(response, f'listing for {self.base_url}/\?x=123'.encode('latin1'))
445+
self.assertRegex(response, rf'listing for {self.base_url}/\?x=123'.encode('latin1'))
446446
# now the bogus encoding
447447
response = self.request(self.base_url + '/?x=%bb').read()
448-
self.assertRegex(response, f'listing for {self.base_url}/\?x=\xef\xbf\xbd'.encode('latin1'))
448+
self.assertRegex(response, rf'listing for {self.base_url}/\?x=\xef\xbf\xbd'.encode('latin1'))
449449

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

0 commit comments

Comments
 (0)