ldap: remove not used test reference for ldap library

This commit is contained in:
Marcin Kuzminski 2018-03-01 13:25:17 +01:00
parent 46ce151bf7
commit caa4a8a15d
2 changed files with 2 additions and 14 deletions

View file

@ -41,7 +41,7 @@ log = logging.getLogger(__name__)
__all__ = [
'get_new_dir', 'TestController',
'link_to', 'ldap_lib_installed', 'clear_all_caches',
'link_to', 'clear_all_caches',
'assert_session_flash', 'login_user', 'no_newline_id_generator',
'TESTS_TMP_PATH', 'HG_REPO', 'GIT_REPO', 'SVN_REPO',
'NEW_HG_REPO', 'NEW_GIT_REPO',
@ -95,17 +95,6 @@ TEST_HG_REPO_PULL = jn(TESTS_TMP_PATH, 'vcshgpull%s' % uniq_suffix)
TEST_REPO_PREFIX = 'vcs-test'
# skip ldap tests if LDAP lib is not installed
ldap_lib_installed = False
try:
import ldap
ldap_lib_installed = True
except ImportError:
ldap = None
# means that python-ldap is not installed
pass
def clear_all_caches():
from beaker.cache import cache_managers
for _cache in cache_managers.values():

View file

@ -24,8 +24,7 @@ import pytest
from rhodecode.tests import (
HG_REPO, TEST_USER_REGULAR2_EMAIL, TEST_USER_REGULAR2_LOGIN,
TEST_USER_REGULAR2_PASS, TEST_USER_ADMIN_LOGIN, TESTS_TMP_PATH,
ldap_lib_installed)
TEST_USER_REGULAR2_PASS, TEST_USER_ADMIN_LOGIN, TESTS_TMP_PATH)
from rhodecode.model import validators as v
from rhodecode.model.user_group import UserGroupModel