forked from pool/python-ldap3
Accepting request 822513 from devel:languages:python
- Add skip-missing-LDAP-server.patch to skip over tests failing because of the missing local LDAP server running (gh#cannatag/ldap3#843). OBS-URL: https://build.opensuse.org/request/show/822513 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-ldap3?expand=0&rev=13
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 24 00:46:48 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add skip-missing-LDAP-server.patch to skip over tests failing because
|
||||
of the missing local LDAP server running (gh#cannatag/ldap3#843).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 15 15:55:38 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
|
||||
@@ -24,8 +24,11 @@ Summary: A strictly RFC 4511 conforming LDAP V3 pure Python client
|
||||
License: LGPL-3.0-only
|
||||
URL: https://github.com/cannatag/ldap3
|
||||
Source: https://github.com/cannatag/ldap3/archive/v%{version}.tar.gz
|
||||
BuildRequires: %{python_module nose}
|
||||
# PATCH-FIX-UPSTREAM skip-missing-LDAP-server.patch gh#cannatag/ldap3#843 mcepl@suse.com
|
||||
# skip over tests failing because of the missing local LDAP server running
|
||||
Patch0: skip-missing-LDAP-server.patch
|
||||
BuildRequires: %{python_module pyasn1 >= 0.4.6}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: fdupes
|
||||
@@ -44,6 +47,8 @@ The name has been changed to avoid confusion with the python-ldap library.
|
||||
|
||||
%prep
|
||||
%setup -q -n ldap3-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
dos2unix COPYING.LESSER.txt COPYING.txt README.rst LICENSE.txt
|
||||
|
||||
%build
|
||||
@@ -54,7 +59,8 @@ dos2unix COPYING.LESSER.txt COPYING.txt README.rst LICENSE.txt
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%python_exec %{_bindir}/nosetests -s test || :
|
||||
export STRATEGY=SYNC SERVER=EDIR DECODER=INTERNAL
|
||||
%pytest test/test*.py
|
||||
|
||||
%files %{python_files}
|
||||
%license COPYING.LESSER.txt COPYING.txt LICENSE.txt
|
||||
|
||||
19
skip-missing-LDAP-server.patch
Normal file
19
skip-missing-LDAP-server.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
--- a/test/config.py
|
||||
+++ b/test/config.py
|
||||
@@ -25,6 +25,7 @@ from os import environ, remove
|
||||
from os import path
|
||||
from random import SystemRandom
|
||||
from tempfile import gettempdir
|
||||
+from unittest import SkipTest
|
||||
|
||||
from ldap3 import SIMPLE, SYNC, ROUND_ROBIN, IP_V6_PREFERRED, IP_SYSTEM_DEFAULT, Server, Connection,\
|
||||
ServerPool, SASL, STRING_TYPES, get_config_parameter, set_config_parameter, \
|
||||
@@ -380,7 +381,7 @@ elif location == 'W10GC9227-AD':
|
||||
test_logging_filename = path.join(gettempdir(), 'ldap3.log')
|
||||
test_valid_names = ['10.160.201.232']
|
||||
else:
|
||||
- raise Exception('testing location ' + location + ' is not valid')
|
||||
+ raise SkipTest('testing location ' + location + ' is not valid')
|
||||
|
||||
if test_logging:
|
||||
try:
|
||||
Reference in New Issue
Block a user