summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBastian Venthur <bastian.venthur@flixbus.com>2022-11-22 17:06:51 +0100
committerGitHub <noreply@github.com>2022-11-22 10:06:51 -0600
commit77fa67aaf2dc18962fa9234d47400c8a6fc1edf4 (patch)
tree3746384201b9c2a561ffe18e25bb8ccb1f18ac1b /test
parentfe39ebfb948db43002547b9258273182705b5434 (diff)
downloadurllib3-77fa67aaf2dc18962fa9234d47400c8a6fc1edf4.tar.gz
Strip leading zeros from ports
Diffstat (limited to 'test')
-rw-r--r--test/test_util.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_util.py b/test/test_util.py
index e64c0cfc..78243552 100644
--- a/test/test_util.py
+++ b/test/test_util.py
@@ -348,6 +348,10 @@ class TestUtil:
with pytest.raises(LocationParseError):
parse_url("https://www.google.com:-80/")
+ def test_parse_url_remove_leading_zeros(self) -> None:
+ url = parse_url("https://example.com:0000000000080")
+ assert url.port == 80
+
def test_Url_str(self) -> None:
U = Url("http", host="google.com")
assert str(U) == U.url