Skip to content

Commit 3073e23

Browse files
[3.12] gh-105821: Use a raw f-string in test_httpservers.py (GH-105822) (#105824)
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 <Pablogsal@gmail.com>
1 parent 9012c55 commit 3073e23

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
@@ -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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy