From e3eb94c23206603103f3c4faec6c227f59a1544c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 26 Apr 2024 06:06:02 +0200 Subject: Merging upstream version 9.5.1+dfsg. Signed-off-by: Daniel Baumann --- ansible_collections/cisco/aci/tests/unit/compat/builtins.py | 13 ------------- ansible_collections/cisco/aci/tests/unit/mock/loader.py | 2 +- .../cisco/aci/tests/unit/module_utils/test_aci.py | 2 -- 3 files changed, 1 insertion(+), 16 deletions(-) (limited to 'ansible_collections/cisco/aci/tests/unit') diff --git a/ansible_collections/cisco/aci/tests/unit/compat/builtins.py b/ansible_collections/cisco/aci/tests/unit/compat/builtins.py index bfc8adfbe..43f88203a 100644 --- a/ansible_collections/cisco/aci/tests/unit/compat/builtins.py +++ b/ansible_collections/cisco/aci/tests/unit/compat/builtins.py @@ -19,16 +19,3 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type - -# -# Compat for python2.7 -# - -# One unittest needs to import builtins via __import__() so we need to have -# the string that represents it -try: - import __builtin__ -except ImportError: - BUILTINS = "builtins" -else: - BUILTINS = "__builtin__" diff --git a/ansible_collections/cisco/aci/tests/unit/mock/loader.py b/ansible_collections/cisco/aci/tests/unit/mock/loader.py index 524870cfa..2caea2883 100644 --- a/ansible_collections/cisco/aci/tests/unit/mock/loader.py +++ b/ansible_collections/cisco/aci/tests/unit/mock/loader.py @@ -30,7 +30,7 @@ from ansible.module_utils._text import to_bytes, to_text class DictDataLoader(DataLoader): def __init__(self, file_mapping=None): file_mapping = {} if file_mapping is None else file_mapping - assert type(file_mapping) == dict + assert isinstance(file_mapping, dict) super(DictDataLoader, self).__init__() diff --git a/ansible_collections/cisco/aci/tests/unit/module_utils/test_aci.py b/ansible_collections/cisco/aci/tests/unit/module_utils/test_aci.py index a1e07ed24..0305ee4c3 100644 --- a/ansible_collections/cisco/aci/tests/unit/module_utils/test_aci.py +++ b/ansible_collections/cisco/aci/tests/unit/module_utils/test_aci.py @@ -40,8 +40,6 @@ aci = AltACIModule() try: from lxml import etree - if sys.version_info >= (2, 7): - from xmljson import cobra except ImportError: pytestmark = pytest.mark.skip("ACI Ansible modules require the lxml and xmljson Python libraries") -- cgit v1.2.3