Browse Source

Use unittest.mock instead of third party mock

Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I994c1f73ead8d3374b7bb67b557bec7535affc02
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
tags/4.2.0^0
Sean McGinnis 2 months ago
parent
commit
2a2f89ee3f
No known key found for this signature in database GPG Key ID: CE7EE4BFAF8D70C8
6 changed files with 6 additions and 8 deletions
  1. +1
    -1
      ironic_inspector_client/test/functional.py
  2. +1
    -1
      ironic_inspector_client/test/test_common_http.py
  3. +1
    -1
      ironic_inspector_client/test/test_shell.py
  4. +1
    -1
      ironic_inspector_client/test/test_v1.py
  5. +1
    -2
      lower-constraints.txt
  6. +1
    -2
      test-requirements.txt

+ 1
- 1
ironic_inspector_client/test/functional.py View File

@@ -16,6 +16,7 @@ import os
import sys
import tempfile
import unittest
from unittest import mock

import eventlet
eventlet.monkey_patch()
@@ -24,7 +25,6 @@ from ironic_inspector import process
from ironic_inspector.test import functional
from keystoneauth1 import session as ks_session
from keystoneauth1 import token_endpoint
import mock
from oslo_concurrency import processutils

import ironic_inspector_client as client


+ 1
- 1
ironic_inspector_client/test/test_common_http.py View File

@@ -13,10 +13,10 @@

import json
import unittest
from unittest import mock

from keystoneauth1 import exceptions
from keystoneauth1 import session
import mock

from ironic_inspector_client.common import http



+ 1
- 1
ironic_inspector_client/test/test_shell.py View File

@@ -15,8 +15,8 @@ import collections
import io
import sys
import tempfile
from unittest import mock

import mock
from osc_lib.tests import utils

from ironic_inspector_client import shell


+ 1
- 1
ironic_inspector_client/test/test_v1.py View File

@@ -13,10 +13,10 @@

import collections
import unittest
from unittest import mock
import uuid

from keystoneauth1 import session
import mock

import ironic_inspector_client
from ironic_inspector_client.common import http


+ 1
- 2
lower-constraints.txt View File

@@ -28,7 +28,6 @@ jsonschema==2.6.0
keystoneauth1==3.4.0
linecache2==1.0.0
mccabe==0.2.1
mock==2.0.0
monotonic==0.6
msgpack-python==0.4.0
munch==2.1.0
@@ -37,7 +36,7 @@ netifaces==0.10.4
openstacksdk==0.11.2
os-client-config==1.28.0
os-service-types==1.2.0
osc-lib==1.8.0
osc-lib==2.1.0
oslo.concurrency==3.25.0
oslo.config==5.2.0
oslo.i18n==3.15.3


+ 1
- 2
test-requirements.txt View File

@@ -6,10 +6,9 @@ doc8>=0.6.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
flake8-import-order>=0.17.1 # LGPLv3
hacking>=3.0.0,<3.1.0 # Apache-2.0
mock>=2.0.0 # BSD
requests-mock>=1.2.0 # Apache-2.0
oslo.concurrency>=3.25.0 # Apache-2.0
osc-lib>=1.8.0 # Apache-2.0
osc-lib>=2.1.0 # Apache-2.0
python-openstackclient>=3.12.0 # Apache-2.0
# Required for syntax highlighting check
Pygments>=2.2.0 # BSD

Loading…
Cancel
Save