Skip to content

Commit a40720a

Browse files
pablogsalmiss-islington
authored andcommitted
pythongh-105821: Use a raw f-string in test_httpservers.py (pythonGH-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 0e7ff84 commit a40720a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_httpservers.py

Lines changed: 2 additions & 2 deletions
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)