Skip to content

Commit

Permalink
tests for ldap.dn.is_dn()
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Jul 24, 2016
1 parent 7fec6bb commit 3fb192f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Tests/t_ldap_dn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
"""
Automatic tests for module ldap.functions
"""

# from Python's standard lib
import unittest

# from python-ldap
import ldap.dn


class TestDN(unittest.TestCase):
"""
test ldap.functions
"""

def test_is_dn(self):
"""
test function is_dn()
"""
self.assertEquals(ldap.dn.is_dn('foobar,ou=ae-dir'), False)
self.assertEquals(ldap.dn.is_dn('uid=xkcd,cn=foobar,ou=ae-dir'), True)


if __name__ == '__main__':
unittest.main()

0 comments on commit 3fb192f

Please sign in to comment.