mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-12-12 15:17:45 +00:00
9870844b38
Now only contains is_valid_[host,port] Intermediate step - this will be in mitproxy.net soon.
11 lines
245 B
Python
11 lines
245 B
Python
# coding=utf-8
|
|
|
|
from netlib import check
|
|
|
|
|
|
def test_is_valid_host():
|
|
assert not check.is_valid_host(b"")
|
|
assert check.is_valid_host(b"one.two")
|
|
assert not check.is_valid_host(b"one" * 255)
|
|
assert check.is_valid_host(b"one.two.")
|