mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
11 lines
245 B
Python
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.")
|