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