changeset 4e8d5e13ca20 in modules/ldap_authentication:default
details:
https://hg.tryton.org/modules/ldap_authentication?cmd=changeset&node=4e8d5e13ca20
description:
Skip test_ldap_server for Python < 3.8
args and kwargs attribute has been added to Mock.call_args in version
3.8
diffstat:
tests/test_module.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r 1c3ded1c4a0e -r 4e8d5e13ca20 tests/test_module.py
--- a/tests/test_module.py Mon Oct 10 23:55:12 2022 +0200
+++ b/tests/test_module.py Tue Oct 11 00:05:30 2022 +0200
@@ -1,6 +1,8 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
+import sys
+import unittest
from unittest.mock import ANY, MagicMock, Mock, patch
import ldap3
@@ -155,6 +157,8 @@
'ldap:///??sub??!bindname=cn=Manager%2co=Foo')[5],
{'!bindname': ['cn=Manager,o=Foo']})
+ @unittest.skipIf(
+ sys.version_info < (3, 8), "call_args does not have args nor kwargs")
def test_ldap_server(self):
"Test ldap_server"
for uri, (host, tls) in [