From d3e8a7ea1f01c2a603c6b1c1f6d6e2e3f5cf3854 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Fri, 23 Oct 2020 11:30:17 +0200 Subject: [PATCH] Testlib: Remove Python 2 code --- tests/testlib.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/testlib.py b/tests/testlib.py index 53b0872..7b4d1fa 100644 --- a/tests/testlib.py +++ b/tests/testlib.py @@ -1,5 +1,5 @@ # -# Copyright 2018 Red Hat, Inc. +# Copyright 2018,2020 Red Hat, Inc. # # This file is part of ansible-nmstate. # @@ -18,10 +18,7 @@ # """ common code for testing the nmstate Ansible modules """ -try: - from unittest import mock -except ImportError: # py2 - import mock +from unittest import mock ANSIBLE_MOCK_MODULES = {} ANSIBLE_MOCK_MODULES["ansible"] = mock.Mock()