From 1100811ef910d3a676509f799659a4344bda6285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 11 Oct 2022 00:05:30 +0200 Subject: [PATCH] Skip test_ldap_server for Python < 3.8 args and kwargs attribute has been added to Mock.call_args in version 3.8 --- tests/test_module.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_module.py b/tests/test_module.py index 1697edb9a1..0d7310d9a0 100644 --- a/tests/test_module.py +++ b/tests/test_module.py @@ -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 @@ class LDAPAuthenticationTestCase(ModuleTestCase): '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 [