Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Sep 27, 2024
1 parent 4908021 commit f7429b0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/test_url_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,31 @@ def test_build_with_authority_without_encoding():
assert str(url) == "http://foo:[email protected]:8000/path"


def test_build_with_authority_empty_host_no_scheme():
url = URL.build(authority="", path="path")
assert str(url) == "path"


def test_build_with_authority_and_only_user():
url = URL.build(scheme="https", authority="user:@foo.com", path="/path")
assert str(url) == "https://user:@foo.com/path"


def test_build_with_authority_with_port():
url = URL.build(scheme="https", authority="foo.com:8080", path="/path")
assert str(url) == "https://foo.com:8080/path"


def test_build_with_authority_with_ipv6():
url = URL.build(scheme="https", authority="[::1]", path="/path")
assert str(url) == "https://[::1]/path"


def test_build_with_authority_with_ipv6_and_port():
url = URL.build(scheme="https", authority="[::1]:81", path="/path")
assert str(url) == "https://[::1]:81/path"


def test_query_str():
u = URL.build(scheme="http", host="127.0.0.1", path="/", query_string="arg=value1")
assert str(u) == "http://127.0.0.1/?arg=value1"
Expand Down

0 comments on commit f7429b0

Please sign in to comment.