Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Conversation

labeneator
Copy link

  • Very basic exploratory patch on .netrc parsing for auth plugins
  • Requires some polish and tests.

Testing out concepts elucidated in issue #718

@coveralls
Copy link

coveralls commented Oct 2, 2018

Coverage Status

Coverage decreased (-0.3%) to 93.373% when pulling 56bfb3a on labeneator:master into 2cd6ea3 on jakubroztocil:master.

Copy link
Member

@jkbrzt jkbrzt left a 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:
Copy link
Member

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 \.

Copy link
Author

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?

Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants