mirror of
https://github.com/httpie/cli.git
synced 2024-11-25 17:23:25 +01:00
Test that --ignore-netrc
doesn't interfere with --auth
This commit is contained in:
parent
1dc67a6a38
commit
3e24827f4d
@ -2,6 +2,7 @@
|
|||||||
import mock
|
import mock
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from httpie.plugins.builtin import HTTPBasicAuth
|
||||||
from httpie.utils import ExplicitNullAuth
|
from httpie.utils import ExplicitNullAuth
|
||||||
from utils import http, add_auth, HTTP_OK, MockEnvironment
|
from utils import http, add_auth, HTTP_OK, MockEnvironment
|
||||||
import httpie.input
|
import httpie.input
|
||||||
@ -98,3 +99,11 @@ def test_ignore_netrc_null_auth():
|
|||||||
env=MockEnvironment(),
|
env=MockEnvironment(),
|
||||||
)
|
)
|
||||||
assert isinstance(args.auth, ExplicitNullAuth)
|
assert isinstance(args.auth, ExplicitNullAuth)
|
||||||
|
|
||||||
|
|
||||||
|
def test_ignore_netrc_together_with_auth():
|
||||||
|
args = httpie.cli.parser.parse_args(
|
||||||
|
args=['--ignore-netrc', '--auth=username:password', 'example.org'],
|
||||||
|
env=MockEnvironment(),
|
||||||
|
)
|
||||||
|
assert isinstance(args.auth, HTTPBasicAuth)
|
||||||
|
Loading…
Reference in New Issue
Block a user