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: I95e8d9564cda2e6a06a3f40b0de6991acb07dd4c
This commit is contained in:
Hervé Beraud 2020-06-09 12:06:07 +02:00 committed by Takashi Kajinami
parent 4eaaa5791b
commit c40f0cc32b
20 changed files with 22 additions and 20 deletions

View File

@ -13,4 +13,4 @@ oslo.log>=3.36.0 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
keystoneauth1>=3.4.0 # Apache-2.0
osc-lib>=1.8.0 # Apache-2.0
osc-lib>=2.1.0 # Apache-2.0

View File

@ -6,7 +6,6 @@ hacking>=3.0,<3.1.0 # Apache-2.0
# Unit testing
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0.0 # BSD
testtools>=2.2.0 # MIT
# Test runner

View File

@ -14,7 +14,7 @@
# limitations under the License.
import mock
from unittest import mock
from keystoneauth1 import session

View File

@ -14,7 +14,8 @@
# limitations under the License.
import mock
from unittest import mock
from osc_lib.tests import utils

View File

@ -15,7 +15,7 @@
import json
import mock
from unittest import mock
from zaqarclient.common import http
from zaqarclient.tests import base

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
import ddt

View File

@ -14,7 +14,7 @@
# limitations under the License.
import json
import mock
from unittest import mock
from zaqarclient.queues.v1 import core
from zaqarclient.tests import base

View File

@ -14,7 +14,7 @@
# limitations under the License.
import json
import mock
from unittest import mock
from zaqarclient.queues.v1 import iterator as iterate
from zaqarclient.queues.v1 import message

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
import ddt

View File

@ -14,7 +14,7 @@
# limitations under the License.
import json
import mock
from unittest import mock
from zaqarclient.queues.v1 import iterator as iterate
from zaqarclient.queues.v2 import message

View File

@ -13,7 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
import requests as prequest
from requests.packages.urllib3 import response

View File

@ -11,7 +11,7 @@
# under the License.
import json
import mock
from unittest import mock
from zaqarclient.tests import base
from zaqarclient.transport import request

View File

@ -13,7 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
from oslo_utils import netutils
from zaqarclient.queues import client

View File

@ -14,8 +14,8 @@
# limitations under the License.
import json
import mock
import time
from unittest import mock
from zaqarclient.queues.v1 import claim
from zaqarclient.tests.queues import base

View File

@ -14,7 +14,7 @@
# limitations under the License.
import json
import mock
from unittest import mock
from zaqarclient.queues.v1 import iterator
from zaqarclient.tests.queues import base

View File

@ -14,7 +14,7 @@
# limitations under the License.
import json
import mock
from unittest import mock
from zaqarclient.tests.queues import base
from zaqarclient.transport import response

View File

@ -14,7 +14,7 @@
# limitations under the License.
import json
import mock
from unittest import mock
from zaqarclient.tests.queues import base
from zaqarclient.transport import response

View File

@ -14,7 +14,7 @@
# limitations under the License.
import json
import mock
from unittest import mock
from zaqarclient.queues.v1 import iterator
from zaqarclient.tests.queues import base

View File

@ -14,7 +14,7 @@
# limitations under the License.
import json
import mock
from unittest import mock
from zaqarclient import errors
from zaqarclient.queues import client

View File

@ -14,7 +14,7 @@
# limitations under the License.
import json
import mock
from unittest import mock
from zaqarclient.tests.queues import base
from zaqarclient.transport import errors