Skip to content

Commit

Permalink
Update test_models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszlitwin authored Oct 25, 2024
1 parent 6ca2678 commit 1f49f42
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ def test_url_cannot_include_unicode_strings():

def test_url_origin_socks5():
url = httpcore.URL("socks5://127.0.0.1")
assert url.origin == httpcore.Origin(scheme=b"socks5", host=b"127.0.0.1", port=1080)
assert url.origin == httpcore.Origin(
scheme=b"socks5", host=b"127.0.0.1", port=1080
)
assert str(url.origin) == "socks5://127.0.0.1:1080"

url = httpcore.URL("socks5h://127.0.0.1")
assert url.origin == httpcore.Origin(scheme=b"socks5h", host=b"127.0.0.1", port=1080)
assert url.origin == httpcore.Origin(
scheme=b"socks5h", host=b"127.0.0.1", port=1080
)
assert str(url.origin) == "socks5h://127.0.0.1:1080"


Expand Down

0 comments on commit 1f49f42

Please sign in to comment.