mitmproxy/test/netlib/test_utils.py
2016-10-20 10:32:09 +13:00

11 lines
245 B
Python

# coding=utf-8
from netlib import utils
def test_is_valid_host():
assert not utils.is_valid_host(b"")
assert utils.is_valid_host(b"one.two")
assert not utils.is_valid_host(b"one" * 255)
assert utils.is_valid_host(b"one.two.")