Skip to content

Commit

Permalink
tests for ldap.filter
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Jul 24, 2016
1 parent 33f0ab3 commit 926ee07
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Tests/t_ldap_filter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
"""
Automatic tests for module ldap.filter
"""

# from Python's standard lib
import unittest

# from python-ldap
from ldap.filter import escape_filter_chars


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

def test_escape_filter_chars(self):
"""
test function is_dn()
"""
self.assertEquals(escape_filter_chars(r'foobar'), 'foobar')
self.assertEquals(escape_filter_chars(r'foo\bar'), r'foo\5cbar')


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

0 comments on commit 926ee07

Please sign in to comment.