server/test/unittest_ldapsource.py
changeset 10950 282880f81311
parent 10912 addc7ba36f69
child 11262 25f9a76ddf50
equal deleted inserted replaced
10949:408867c79d9e 10950:282880f81311
    25 import sys
    25 import sys
    26 import shutil
    26 import shutil
    27 import time
    27 import time
    28 import subprocess
    28 import subprocess
    29 import tempfile
    29 import tempfile
       
    30 import unittest
    30 from os.path import join
    31 from os.path import join
    31 
    32 
    32 from six import string_types
    33 from six import string_types
    33 from six.moves import range
    34 from six.moves import range
    34 
    35 
   113     test_db_id = 'ldap-feed'
   114     test_db_id = 'ldap-feed'
   114     loglevel = 'ERROR'
   115     loglevel = 'ERROR'
   115 
   116 
   116     @classmethod
   117     @classmethod
   117     def setUpClass(cls):
   118     def setUpClass(cls):
       
   119         if not os.path.exists('/usr/sbin/slapd'):
       
   120             raise unittest.SkipTest('slapd not found')
   118         from cubicweb.cwctl import init_cmdline_log_threshold
   121         from cubicweb.cwctl import init_cmdline_log_threshold
   119         init_cmdline_log_threshold(cls.config, cls.loglevel)
   122         init_cmdline_log_threshold(cls.config, cls.loglevel)
   120         cls._tmpdir = create_slapd_configuration(cls)
   123         cls._tmpdir = create_slapd_configuration(cls)
   121 
   124 
   122     @classmethod
   125     @classmethod