From 3e24827f4d39d8aa4a685929fb4078eb5e94662b Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Sat, 31 Aug 2019 12:14:44 +0200 Subject: [PATCH] Test that `--ignore-netrc` doesn't interfere with `--auth` --- tests/test_auth.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_auth.py b/tests/test_auth.py index a4d95f80..402834c2 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -2,6 +2,7 @@ import mock import pytest +from httpie.plugins.builtin import HTTPBasicAuth from httpie.utils import ExplicitNullAuth from utils import http, add_auth, HTTP_OK, MockEnvironment import httpie.input @@ -98,3 +99,11 @@ def test_ignore_netrc_null_auth(): env=MockEnvironment(), ) 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)