Prefer unitest.mock by universally using compat.mock (#506)

* tests.unit.compat.mock: Remove legacy compat code

This removes old Python 3.4 compatibility code that is no longer needed.

* Prefer unitest.mock by universally using compat.mock

`mock` is a backport of the `unittest.mock` module from the stdlib, and
there's no reason to use it on newer Python versions.
This commit is contained in:
Maxwell G
2022-09-04 15:21:31 -05:00
committed by GitHub
parent 98bfdb322a
commit 152c5422f1
7 changed files with 6 additions and 85 deletions

View File

@@ -8,7 +8,7 @@ __metaclass__ = type
import pytest
from mock import MagicMock
from ansible_collections.community.crypto.tests.unit.compat.mock import MagicMock
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (