mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user