aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarcus R. Matos <marcus@matosconsulting.com>2020-04-03 20:15:50 -0500
committerMarcus R. Matos <marcus@matosconsulting.com>2020-04-03 20:15:50 -0500
commit2722f4fd764657b1f059c66aa75a879acd56abca (patch)
treed54535b9ed8c696d1ce8d6502f02d9f8be6c102f /test
parent1039d09ed618afadf5d24a741d85ec34be29edd7 (diff)
downloadmitmproxy-2722f4fd764657b1f059c66aa75a879acd56abca.tar.gz
mitmproxy-2722f4fd764657b1f059c66aa75a879acd56abca.tar.bz2
mitmproxy-2722f4fd764657b1f059c66aa75a879acd56abca.zip
#3885 handle hyphens in domain name, enhance validation checks, linter updates
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/net/test_check.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/mitmproxy/net/test_check.py b/test/mitmproxy/net/test_check.py
index e9258d7c..7def75fd 100644
--- a/test/mitmproxy/net/test_check.py
+++ b/test/mitmproxy/net/test_check.py
@@ -36,7 +36,7 @@ def test_is_valid_host():
assert not check.is_valid_host(b'!.example.com')
# Every label must be between 1 and 63 chars
- #assert not check.is_valid_host('.tld')
+ assert not check.is_valid_host(b'.tld')
assert check.is_valid_host(b'x' * 1 + b'.tld')
assert check.is_valid_host(b'x' * 30 + b'.tld')
assert not check.is_valid_host(b'x' * 64 + b'.tld')
@@ -55,7 +55,7 @@ def test_is_valid_host():
assert not check.is_valid_host(b'a._example_')
assert not check.is_valid_host(b'a.example_')
- # Misc Dash/Hyphen/Minus Test Cases
+ # Misc Dash/Hyphen/Minus Test Cases
assert check.is_valid_host(b'-example')
assert check.is_valid_host(b'-example_')
assert check.is_valid_host(b'example-')