Merge "Use unittest.mock instead of mock"

This commit is contained in:
Zuul 2020-11-28 16:35:39 +00:00 committed by Gerrit Code Review
commit 2e69bf1958
3 changed files with 1 additions and 6 deletions

View File

@ -1,4 +1,3 @@
mock
pre-commit>=1.20.0 # MIT
pytest
pytest-mock

View File

@ -6,10 +6,7 @@ import json
from ansible.module_utils import basic
from ansible.module_utils._text import to_bytes
try:
from unittest.mock import patch # Python 3
except ImportError:
from mock import patch # Python 2 needs mock package installed
from unittest.mock import patch
def set_module_args(**args):

View File

@ -54,7 +54,6 @@ setenv =
PYTHONPATH={env:PYTHONPATH:}:library
deps =
ansible>=2.9,<2.10
mock
molecule[test,docker]>=3.1.5,<3.2 # MIT
commands =
python -m pytest --color=yes --html={envlogdir}/reports.html --self-contained-html {tty:-s} {posargs}