summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-009-parse_ldap_uri.py
blob: 88854f8589869a9cf5b91a92870fe3168cd99088 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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))