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: I7498ea2353cccca7b23d9ef74015a566ac431f90 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
		@@ -11,10 +11,10 @@
 | 
			
		||||
# under the License.
 | 
			
		||||
 | 
			
		||||
import argparse
 | 
			
		||||
from unittest import mock
 | 
			
		||||
import uuid
 | 
			
		||||
 | 
			
		||||
import fixtures
 | 
			
		||||
import mock
 | 
			
		||||
from oslo_config import cfg
 | 
			
		||||
 | 
			
		||||
from keystoneclient.auth import base
 | 
			
		||||
 
 | 
			
		||||
@@ -10,9 +10,9 @@
 | 
			
		||||
# License for the specific language governing permissions and limitations
 | 
			
		||||
# under the License.
 | 
			
		||||
 | 
			
		||||
from unittest import mock
 | 
			
		||||
import uuid
 | 
			
		||||
 | 
			
		||||
import mock
 | 
			
		||||
from oslo_config import cfg
 | 
			
		||||
from oslo_config import fixture as config
 | 
			
		||||
import stevedore
 | 
			
		||||
 
 | 
			
		||||
@@ -11,9 +11,9 @@
 | 
			
		||||
# under the License.
 | 
			
		||||
 | 
			
		||||
import argparse
 | 
			
		||||
from unittest import mock
 | 
			
		||||
import uuid
 | 
			
		||||
 | 
			
		||||
import mock
 | 
			
		||||
 | 
			
		||||
from keystoneclient.auth.identity.generic import cli
 | 
			
		||||
from keystoneclient import exceptions
 | 
			
		||||
 
 | 
			
		||||
@@ -12,11 +12,11 @@
 | 
			
		||||
 | 
			
		||||
import abc
 | 
			
		||||
import datetime
 | 
			
		||||
from unittest import mock
 | 
			
		||||
import uuid
 | 
			
		||||
 | 
			
		||||
from keystoneauth1 import fixture
 | 
			
		||||
from keystoneauth1 import plugin
 | 
			
		||||
import mock
 | 
			
		||||
from oslo_utils import timeutils
 | 
			
		||||
import six
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -12,9 +12,9 @@
 | 
			
		||||
 | 
			
		||||
import argparse
 | 
			
		||||
import copy
 | 
			
		||||
from unittest import mock
 | 
			
		||||
import uuid
 | 
			
		||||
 | 
			
		||||
import mock
 | 
			
		||||
 | 
			
		||||
from keystoneclient.auth.identity import v2
 | 
			
		||||
from keystoneclient import exceptions
 | 
			
		||||
 
 | 
			
		||||
@@ -12,10 +12,10 @@
 | 
			
		||||
 | 
			
		||||
import argparse
 | 
			
		||||
import copy
 | 
			
		||||
from unittest import mock
 | 
			
		||||
import uuid
 | 
			
		||||
 | 
			
		||||
from keystoneauth1 import fixture
 | 
			
		||||
import mock
 | 
			
		||||
 | 
			
		||||
from keystoneclient import access
 | 
			
		||||
from keystoneclient.auth.identity import v3
 | 
			
		||||
 
 | 
			
		||||
@@ -11,9 +11,9 @@
 | 
			
		||||
# under the License.
 | 
			
		||||
 | 
			
		||||
import argparse
 | 
			
		||||
from unittest import mock
 | 
			
		||||
import uuid
 | 
			
		||||
 | 
			
		||||
import mock
 | 
			
		||||
 | 
			
		||||
from keystoneclient.auth.identity.generic import password
 | 
			
		||||
from keystoneclient.auth.identity import v2
 | 
			
		||||
 
 | 
			
		||||
@@ -11,10 +11,10 @@
 | 
			
		||||
# under the License.
 | 
			
		||||
 | 
			
		||||
import functools
 | 
			
		||||
from unittest import mock
 | 
			
		||||
import uuid
 | 
			
		||||
 | 
			
		||||
from keystoneauth1 import fixture
 | 
			
		||||
import mock
 | 
			
		||||
from oslo_config import cfg
 | 
			
		||||
 | 
			
		||||
from keystoneclient import access
 | 
			
		||||
 
 | 
			
		||||
@@ -13,8 +13,8 @@
 | 
			
		||||
import errno
 | 
			
		||||
import os
 | 
			
		||||
import subprocess
 | 
			
		||||
from unittest import mock
 | 
			
		||||
 | 
			
		||||
import mock
 | 
			
		||||
import testresources
 | 
			
		||||
from testtools import matchers
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -10,8 +10,8 @@
 | 
			
		||||
#    License for the specific language governing permissions and limitations
 | 
			
		||||
#    under the License.
 | 
			
		||||
 | 
			
		||||
import mock
 | 
			
		||||
import requests
 | 
			
		||||
from unittest import mock
 | 
			
		||||
 | 
			
		||||
from keystoneclient import httpclient
 | 
			
		||||
from keystoneclient.tests.unit import utils
 | 
			
		||||
 
 | 
			
		||||
@@ -11,8 +11,8 @@
 | 
			
		||||
#    under the License.
 | 
			
		||||
 | 
			
		||||
import datetime
 | 
			
		||||
from unittest import mock
 | 
			
		||||
 | 
			
		||||
import mock
 | 
			
		||||
from oslo_utils import timeutils
 | 
			
		||||
 | 
			
		||||
from keystoneclient import access
 | 
			
		||||
 
 | 
			
		||||
@@ -15,9 +15,9 @@
 | 
			
		||||
import argparse
 | 
			
		||||
import itertools
 | 
			
		||||
import logging
 | 
			
		||||
from unittest import mock
 | 
			
		||||
import uuid
 | 
			
		||||
 | 
			
		||||
import mock
 | 
			
		||||
from oslo_config import cfg
 | 
			
		||||
from oslo_config import fixture as config
 | 
			
		||||
from oslo_serialization import jsonutils
 | 
			
		||||
 
 | 
			
		||||
@@ -11,10 +11,11 @@
 | 
			
		||||
# See the License for the specific language governing permissions and
 | 
			
		||||
# limitations under the License.
 | 
			
		||||
 | 
			
		||||
from unittest import mock
 | 
			
		||||
 | 
			
		||||
import fixtures
 | 
			
		||||
import uuid
 | 
			
		||||
 | 
			
		||||
import mock
 | 
			
		||||
import six
 | 
			
		||||
from six.moves.urllib import parse as urlparse
 | 
			
		||||
from testtools import matchers
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
# License for the specific language governing permissions and limitations
 | 
			
		||||
# under the License.
 | 
			
		||||
 | 
			
		||||
import mock
 | 
			
		||||
from unittest import mock
 | 
			
		||||
import uuid
 | 
			
		||||
 | 
			
		||||
from keystoneclient import exceptions
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,6 @@ fixtures>=3.0.0 # Apache-2.0/BSD
 | 
			
		||||
keyring>=5.5.1,<19.0.0;python_version=='2.7'  # MIT/PSF
 | 
			
		||||
keyring>=5.5.1;python_version>='3.4'  # MIT/PSF
 | 
			
		||||
lxml!=3.7.0,>=3.4.1 # BSD
 | 
			
		||||
mock>=2.0.0 # BSD
 | 
			
		||||
oauthlib>=0.6.2 # BSD
 | 
			
		||||
os-client-config>=1.28.0 # Apache-2.0
 | 
			
		||||
oslotest>=3.2.0 # Apache-2.0
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user