summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-12-19 14:45:26 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-12-19 14:45:26 +0100
commit2633cccdd1dfd02205e9d81858d5fcdf571a3179 (patch)
tree4fdf61e72c266356fac4044f014f7bd184e09b82 /tests
parent05e22e2a6a219462164e919aa26541e3a59a177c (diff)
downloadpykolab-2633cccdd1dfd02205e9d81858d5fcdf571a3179.tar.gz
Adjust utils.parse_ldap_uri()
Diffstat (limited to 'tests')
-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))
+
+