diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2023-06-15 10:48:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-15 10:48:01 (GMT) |
commit | 09ce8c3b48f940eb8865330f029b8069854c3106 (patch) | |
tree | 39199cd6d531bdc285c8350468619050a51055e7 /Lib | |
parent | c5111aec2bac464b6643e21fe0844c9b8c4c661a (diff) | |
download | cpython-09ce8c3b48f940eb8865330f029b8069854c3106.zip cpython-09ce8c3b48f940eb8865330f029b8069854c3106.tar.gz cpython-09ce8c3b48f940eb8865330f029b8069854c3106.tar.bz2 |
gh-105821: Use a raw f-string in test_httpservers.py (#105822)
Use a raw f-string in test_httpservers.py
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_httpservers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py index cdd1bea..cfd8a10 100644 --- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -442,10 +442,10 @@ class SimpleHTTPServerTestCase(BaseTestCase): def test_undecodable_parameter(self): # sanity check using a valid parameter response = self.request(self.base_url + '/?x=123').read() - self.assertRegex(response, f'listing for {self.base_url}/\?x=123'.encode('latin1')) + self.assertRegex(response, rf'listing for {self.base_url}/\?x=123'.encode('latin1')) # now the bogus encoding response = self.request(self.base_url + '/?x=%bb').read() - self.assertRegex(response, f'listing for {self.base_url}/\?x=\xef\xbf\xbd'.encode('latin1')) + self.assertRegex(response, rf'listing for {self.base_url}/\?x=\xef\xbf\xbd'.encode('latin1')) def test_get_dir_redirect_location_domain_injection_bug(self): """Ensure //evil.co/..%2f../../X does not put //evil.co/ in Location. |