Mercurial > kallithea
changeset 5334:d8918bb94b80
tests: introduce pam_lib_installed for testing of the optional PAM auth module
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 31 Jul 2015 15:44:07 +0200 |
parents | f5a83106cd30 |
children | 8ccc02375c0d |
files | kallithea/tests/__init__.py |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/tests/__init__.py Fri Jul 31 15:44:07 2015 +0200 +++ b/kallithea/tests/__init__.py Fri Jul 31 15:44:07 2015 +0200 @@ -68,7 +68,7 @@ __all__ = [ 'parameterized', 'environ', 'url', 'get_new_dir', 'TestController', - 'SkipTest', 'ldap_lib_installed', 'BaseTestCase', 'init_stack', + 'SkipTest', 'ldap_lib_installed', 'pam_lib_installed', 'BaseTestCase', 'init_stack', 'TESTS_TMP_PATH', 'HG_REPO', 'GIT_REPO', 'NEW_HG_REPO', 'NEW_GIT_REPO', 'HG_FORK', 'GIT_FORK', 'TEST_USER_ADMIN_LOGIN', 'TEST_USER_ADMIN_PASS', 'TEST_USER_ADMIN_EMAIL', 'TEST_USER_REGULAR_LOGIN', 'TEST_USER_REGULAR_PASS', @@ -143,6 +143,12 @@ # means that python-ldap is not installed pass +try: + import pam + pam.PAM_TEXT_INFO + pam_lib_installed = True +except ImportError: + pam_lib_installed = False def get_new_dir(title): """