From: Tom Christie Date: Mon, 28 Oct 2024 17:38:33 +0000 (+0000) Subject: Cleanup unneccessary test case (#3375) X-Git-Tag: 0.28.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeb5e3c2a3ff2403ec47b5926715ecd61143d92d;p=thirdparty%2Fhttpx.git Cleanup unneccessary test case (#3375) --- diff --git a/tests/client/test_auth.py b/tests/client/test_auth.py index b3aeaf4e..7638b8bd 100644 --- a/tests/client/test_auth.py +++ b/tests/client/test_auth.py @@ -270,29 +270,6 @@ def test_netrc_auth_credentials_do_not_exist() -> None: assert response.json() == {"auth": None} -@pytest.mark.skipif( - sys.version_info < (3, 11), - reason="netrc files without a password are invalid with Python < 3.11", -) -def test_netrc_auth_nopassword() -> None: # pragma: no cover - """ - Python has different netrc parsing behaviours with different versions. - For Python 3.11+ a netrc file with no password is valid. In this case - we want to check that we allow the netrc auth, and simply don't provide - any credentials in the request. - """ - netrc_file = str(FIXTURES_DIR / ".netrc-nopassword") - url = "http://example.org" - app = App() - auth = httpx.NetRCAuth(netrc_file) - - with httpx.Client(transport=httpx.MockTransport(app), auth=auth) as client: - response = client.get(url) - - assert response.status_code == 200 - assert response.json() == {"auth": None} - - @pytest.mark.skipif( sys.version_info >= (3, 11), reason="netrc files without a password are valid from Python >= 3.11",