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: I15fc9e39d69f817fb5db8ce7111d0397a25c94b0
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
tags/4.0.2^0
Sean McGinnis 3 months ago
parent
commit
8b2aaa3f6c
No known key found for this signature in database GPG Key ID: CE7EE4BFAF8D70C8
6 changed files with 6 additions and 6 deletions
  1. +0
    -1
      lower-constraints.txt
  2. +2
    -1
      oslo_middleware/tests/test_catch_errors.py
  3. +2
    -1
      oslo_middleware/tests/test_correlation_id.py
  4. +1
    -1
      oslo_middleware/tests/test_healthcheck.py
  5. +1
    -1
      oslo_middleware/tests/test_stats.py
  6. +0
    -1
      test-requirements.txt

+ 0
- 1
lower-constraints.txt View File

@@ -15,7 +15,6 @@ keystoneauth1==3.4.0
linecache2==1.0.0
MarkupSafe==1.0
mccabe==0.2.1
mock==2.0.0
mox3==0.20.0
msgpack-python==0.4.0
netaddr==0.7.18


+ 2
- 1
oslo_middleware/tests/test_catch_errors.py View File

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

from unittest import mock

import fixtures
import mock
from oslotest import base as test_base
import webob.dec
import webob.exc


+ 2
- 1
oslo_middleware/tests/test_correlation_id.py View File

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

from unittest import mock

import fixtures
import mock
from oslotest import base as test_base

from oslo_middleware import correlation_id


+ 1
- 1
oslo_middleware/tests/test_healthcheck.py View File

@@ -15,8 +15,8 @@

import threading
import time
from unittest import mock

import mock
from oslo_config import fixture as config
from oslo_serialization import jsonutils
from oslotest import base as test_base


+ 1
- 1
oslo_middleware/tests/test_stats.py View File

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

from unittest import mock
import uuid

import mock
from oslotest import base as test_base
import statsd
import webob.dec


+ 0
- 1
test-requirements.txt View File

@@ -4,7 +4,6 @@

fixtures>=3.0.0 # Apache-2.0/BSD
hacking>=1.1.0,<1.2.0 # Apache-2.0
mock>=2.0.0 # BSD
oslotest>=3.2.0 # Apache-2.0
testtools>=2.2.0 # MIT
coverage!=4.4,>=4.0 # Apache-2.0


Loading…
Cancel
Save