summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-009-parse_ldap_uri.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test-009-parse_ldap_uri.py')
-rw-r--r--tests/unit/test-009-parse_ldap_uri.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/test-009-parse_ldap_uri.py b/tests/unit/test-009-parse_ldap_uri.py
new file mode 100644
index 0000000..d020f8d
--- /dev/null
+++ b/tests/unit/test-009-parse_ldap_uri.py
@@ -0,0 +1,17 @@
+import unittest
+
+from pykolab import utils
+
+class TestParseLdapUri(unittest.TestCase):
+
+ def test_001_ldap_uri(self):
+ ldap_uri = "ldap://localhost"
+ result = utils.parse_ldap_uri(ldap_uri)
+ self.assertEqual(result, ("ldap", "localhost", "389", None, None, None, None))
+
+ def test_002_ldap_uri_port(self):
+ ldap_uri = "ldap://localhost:389"
+ result = utils.parse_ldap_uri(ldap_uri)
+ self.assertEqual(result, ("ldap", "localhost", "389", None, None, None, None))
+
+