File: t_ldap_controls_sss.py

package info (click to toggle)
python-ldap 3.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,756 kB
  • sloc: python: 9,558; ansic: 3,052; makefile: 139; sh: 79
file content (17 lines) | stat: -rw-r--r-- 437 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os
import unittest

# Switch off processing .ldaprc or ldap.conf before importing _ldap
os.environ['LDAPNOINIT'] = '1'

from ldap.controls import sss


class TestControlsPPolicy(unittest.TestCase):
    def test_create_sss_request_control(self):
        control = sss.SSSRequestControl(ordering_rules=['-uidNumber'])
        self.assertEqual(control.ordering_rules, ['-uidNumber'])


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