Browse Source

Use unittest.mock instead of mock

The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Change-Id: If7d7ed6f3b398b48ace903f8307adc64264b2f1b
changes/69/734569/1
Hervé Beraud 1 month ago
parent
commit
e61f16c3fa
5 changed files with 15 additions and 4 deletions
  1. +0
    -1
      doc/requirements.txt
  2. +13
    -0
      doc/requirements.txt
  3. +0
    -1
      test-requirements.txt
  4. +1
    -1
      tests/plugins/action/test_timestamp_file.py
  5. +1
    -1
      tests/plugins/modules/test_tripleo_shell_script.py

+ 0
- 1
doc/requirements.txt View File

@@ -1 +0,0 @@
../test-requirements.txt

+ 13
- 0
doc/requirements.txt View File

@@ -0,0 +1,13 @@
netaddr # BSD
stestr>=2.0.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
ruamel.yaml
pre-commit # MIT
ansible>=2.8

# this is required for the docs build jobs
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
reno>=3.1.0 # Apache-2.0
doc8>=0.8.0 # Apache-2.0
bashate>=0.6.0 # Apache-2.0

+ 0
- 1
test-requirements.txt View File

@@ -1,5 +1,4 @@
netaddr # BSD
mock>=2.0.0 # BSD
stestr>=2.0.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
ruamel.yaml


+ 1
- 1
tests/plugins/action/test_timestamp_file.py View File

@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.

import mock
from unittest import mock

from ansible.errors import AnsibleActionFail
from ansible.errors import AnsibleActionSkip


+ 1
- 1
tests/plugins/modules/test_tripleo_shell_script.py View File

@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.

import mock
from unittest import mock

from plugins.modules import tripleo_shell_script
from tests import base as tests_base


Loading…
Cancel
Save