summaryrefslogtreecommitdiffstats
path: root/tests/unit/test-009-parse_ldap_uri.py
blob: 2596ddd527109921924c85367b023c2e6732ef28 (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))