diff options
author | Bastian Venthur <bastian.venthur@flixbus.com> | 2022-11-22 17:06:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-22 10:06:51 -0600 |
commit | 77fa67aaf2dc18962fa9234d47400c8a6fc1edf4 (patch) | |
tree | 3746384201b9c2a561ffe18e25bb8ccb1f18ac1b /test/test_util.py | |
parent | fe39ebfb948db43002547b9258273182705b5434 (diff) | |
download | urllib3-77fa67aaf2dc18962fa9234d47400c8a6fc1edf4.tar.gz |
Strip leading zeros from ports
Diffstat (limited to 'test/test_util.py')
-rw-r--r-- | test/test_util.py | 4 |
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 |