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: Ib353cf9878334d91e551bf75121413c6fb2222ea
changes/57/734457/2
Hervé Beraud 1 month ago
parent
commit
24245ce18e
5 changed files with 4 additions and 5 deletions
  1. +1
    -1
      os_collect_config/tests/test_collect.py
  2. +1
    -1
      os_collect_config/tests/test_config_drive.py
  3. +1
    -1
      os_collect_config/tests/test_ec2.py
  4. +1
    -1
      os_collect_config/tests/test_zaqar.py
  5. +0
    -1
      test-requirements.txt

+ 1
- 1
os_collect_config/tests/test_collect.py View File

@@ -19,10 +19,10 @@ import os
import signal
import sys
import tempfile
from unittest import mock

import extras
import fixtures
import mock
from oslo_config import cfg
import testtools
from testtools import matchers


+ 1
- 1
os_collect_config/tests/test_config_drive.py View File

@@ -14,9 +14,9 @@
import json
import os
import subprocess
from unittest import mock

import fixtures
import mock
import testtools

from os_collect_config import config_drive


+ 1
- 1
os_collect_config/tests/test_ec2.py View File

@@ -15,10 +15,10 @@

import json
import os
from unittest import mock
import uuid

import fixtures
import mock
from oslo_config import cfg
import requests
import six.moves.urllib.parse as urlparse


+ 1
- 1
os_collect_config/tests/test_zaqar.py View File

@@ -13,10 +13,10 @@
# limitations under the License.

import json
from unittest import mock

import fixtures
from keystoneclient import discover as ks_discover
import mock
from oslo_config import cfg
from oslo_config import fixture as config_fixture
import testtools


+ 0
- 1
test-requirements.txt View File

@@ -5,7 +5,6 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0

coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0.0 # BSD
python-subunit>=1.0.0 # Apache-2.0/BSD
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD
stestr>=2.0.0 # Apache-2.0


Loading…
Cancel
Save