Skip to content

Commit 09ce8c3

Browse files
authored
pythongh-105821: Use a raw f-string in test_httpservers.py (python#105822)
Use a raw f-string in test_httpservers.py
1 parent c5111ae commit 09ce8c3

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)