You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure how the PR build succeeded and the master branch merge failed, but it looks like it is.
We probably shouldn't call keyring during tests anyway and make sure to mock it out in the test cases which may call it.
Possible Implementation
An example of how to mock it can be seen when mocking getpass:
Expected Behavior
Testcases should pass and shoulds mock out keyring, so as not to call any OS keychains
Current Behavior
It appears the test cases are currently calling keyring on the master branch in travis. https://travis-ci.org/physera/onelogin-aws-cli/jobs/370302728
Possible Solution
Mock the keyring functions or their wrappers in the
onelogin_aws_cli.Credentials
class.Steps to Reproduce
Context (Environment)
I'm not sure how the PR build succeeded and the master branch merge failed, but it looks like it is.
We probably shouldn't call keyring during tests anyway and make sure to mock it out in the test cases which may call it.
Possible Implementation
An example of how to mock it can be seen when mocking
getpass
:onelogin-aws-cli/onelogin_aws_cli/tests/test_oneloginAWS_saml.py
Line 56 in a4060db
Alternatively, use a MagicMock to mock the wrappers. For example,
onelogin-aws-cli/onelogin_aws_cli/tests/test_oneloginAWS_saml.py
Line 42 in a4060db
onelogin_aws_cli.Credentials._load_password_from_keychain
andonelogin_aws_cli.Credentials._save_password_to_keychain
The text was updated successfully, but these errors were encountered: