-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) Co-authored-by: J. Nick Koston <[email protected]>
- Loading branch information
1 parent
c95998e
commit 9f8721a
Showing
3 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,6 +197,12 @@ def test_basic_auth_no_user_from_url() -> None: | |
assert auth.password == "pass" | ||
|
||
|
||
def test_basic_auth_no_auth_from_url() -> None: | ||
url = URL("http://example.com") | ||
auth = helpers.BasicAuth.from_url(url) | ||
assert auth is None | ||
|
||
|
||
def test_basic_auth_from_not_url() -> None: | ||
with pytest.raises(TypeError): | ||
helpers.BasicAuth.from_url("http://user:[email protected]") | ||
|