-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First pass at netrc integration #719
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍 Just a minor inline comment. Also, please update CHANGELOG.md
.
httpie/input.py
Outdated
@@ -238,6 +239,20 @@ def _process_auth(self): | |||
self.args.auth_type = default_auth_plugin.auth_type | |||
plugin = plugin_manager.get_auth_plugin(self.args.auth_type)() | |||
|
|||
if plugin.auth_require and self.args.auth is None \ | |||
and plugin.netrc_parse: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be nicer as if (a and b and c)
to avoid the need to use \
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any ideas on how to mock the netrc file loading for tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the mock
library (see tests/
for examples).
Testing out concepts elucidated in issue #718