aboutsummaryrefslogtreecommitdiffstats
path: root/test/netlib/test_check.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/netlib/test_check.py')
-rw-r--r--test/netlib/test_check.py10
1 files changed, 10 insertions, 0 deletions
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.")