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

* Prefer unitest.mock by 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. `mock` is deprecated
in Fedora, so I figured I'd propose this here before downstream patching
our ansible-collection-community-docker package.

* Remove compat.mock code for older Python 3 versions

This removes compatibility for older versions of Python 3 that are no
longer supported.
This commit is contained in:
Maxwell G
2022-07-31 16:39:31 +02:00
committed by GitHub
parent e90647b209
commit a33e51e04a
2 changed files with 1 additions and 80 deletions
@@ -11,7 +11,7 @@ import textwrap
import pytest
from mock import MagicMock
from ansible_collections.community.docker.tests.unit.compat.mock import MagicMock
from ansible import constants as C
from ansible.errors import AnsibleError