From 9870844b38c84e7446b15909758497cecb26301e Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 20 Oct 2016 10:46:47 +1300 Subject: netlib.utils -> netlib.check Now only contains is_valid_[host,port] Intermediate step - this will be in mitproxy.net soon. --- test/netlib/test_check.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/netlib/test_check.py (limited to 'test/netlib/test_check.py') diff --git a/test/netlib/test_check.py b/test/netlib/test_check.py new file mode 100644 index 00000000..6a1388f4 --- /dev/null +++ b/test/netlib/test_check.py @@ -0,0 +1,10 @@ +# 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.") -- cgit v1.2.3