We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0fe72f commit a948fe4Copy full SHA for a948fe4
1 file changed
tests/test_requests.py
@@ -707,15 +707,15 @@ def get_netrc_auth_mock(url):
707
708
def test_basicauth_with_netrc_leak(self, httpbin):
709
url1 = httpbin("basic-auth", "user", "pass")
710
- url = url1[len("http://"):]
+ url = url1[len("http://") :]
711
domain = url.split(":")[0]
712
url = f"http://example.com:@{url}"
713
714
netrc_file = tempfile.NamedTemporaryFile()
715
netrc_file.write(b"machine example.com\n")
716
netrc_file.write(b"login wronguser\n")
717
netrc_file.write(b"password wrongpass\n")
718
- netrc_file.write(f"machine {domain}\n".encode("utf8"))
+ netrc_file.write(f"machine {domain}\n".encode())
719
netrc_file.write(b"login user\n")
720
netrc_file.write(b"password pass\n")
721
netrc_file.seek(0)
0 commit comments