-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test a keyring raising
KeyringError
on access.
* tests/utils/test_authenticator.py * tests/conftest.py
- Loading branch information
1 parent
6292400
commit 5e00b18
Showing
2 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,19 @@ def test_authenticator_ignores_locked_keyring( | |
assert request.headers["Authorization"] == "Basic Zm9vMDAxOg==" | ||
|
||
|
||
def test_authenticator_ignores_failing_keyring( | ||
mock_config: Config, | ||
mock_remote: None, | ||
http: type[httpretty.httpretty], | ||
with_erroneous_keyring: None, | ||
) -> None: | ||
authenticator = Authenticator(mock_config, NullIO()) | ||
authenticator.request("get", "https://[email protected]/files/foo-0.1.0.tar.gz") | ||
request = http.last_request() | ||
|
||
assert request.headers["Authorization"] == "Basic Zm9vMDAxOg==" | ||
|
||
|
||
def test_authenticator_uses_password_only_credentials( | ||
mock_config: Config, mock_remote: None, http: type[httpretty.httpretty] | ||
) -> None: | ||
|