diff --git a/tests/test_ssl.py b/tests/test_ssl.py
index d6432d58bb87e4e9549b75c51ae46101b85dda78..29d5278b0c58569298f9cbb5c5aa243c6ce60cf0 100755
--- a/tests/test_ssl.py
+++ b/tests/test_ssl.py
@@ -59,7 +59,7 @@ for s, d in conf_servers:
 
     # check if custom port is used
     v_split = v.split(":")
-    if v_split > 1:
+    if len(v_split) > 1:
         server_name = v_split[0]
         port = int(v_split[1])
     else: