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: If70feb43be0b12c582bc4a9f27faa8f83de93774 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
@@ -10,9 +10,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from openstack import connection as sdk_connection
|
||||
import testtools
|
||||
from unittest import mock
|
||||
|
||||
from senlinclient import plugin
|
||||
|
||||
|
@@ -11,7 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
from heatclient.common import template_utils
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import six
|
||||
import testtools
|
||||
|
||||
|
@@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import sys
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils
|
||||
import requests
|
||||
|
||||
|
@@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from openstack import exceptions as sdk_exc
|
||||
from osc_lib import exceptions as exc
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from senlinclient.tests.unit.v1 import fakes
|
||||
from senlinclient.v1 import build_info as osc_build_info
|
||||
|
@@ -10,8 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import testtools
|
||||
from unittest import mock
|
||||
|
||||
from senlinclient import plugin
|
||||
from senlinclient.v1 import client
|
||||
|
@@ -12,8 +12,8 @@
|
||||
|
||||
import copy
|
||||
import subprocess
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from openstack import exceptions as sdk_exc
|
||||
from osc_lib import exceptions as exc
|
||||
import six
|
||||
|
@@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from senlinclient.tests.unit.v1 import fakes
|
||||
from senlinclient.v1 import cluster_policy as osc_cluster_policy
|
||||
|
@@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from openstack import exceptions as sdk_exc
|
||||
from osc_lib import exceptions as exc
|
||||
|
||||
|
@@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from openstack import exceptions as sdk_exc
|
||||
from osc_lib import exceptions as exc
|
||||
import six
|
||||
|
@@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from openstack import exceptions as sdk_exc
|
||||
from osc_lib import exceptions as exc
|
||||
import six
|
||||
|
@@ -10,9 +10,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from openstack import exceptions as sdk_exc
|
||||
from osc_lib import exceptions as exc
|
||||
from unittest import mock
|
||||
|
||||
from senlinclient.tests.unit.v1 import fakes
|
||||
from senlinclient.v1 import policy_type as osc_policy_type
|
||||
|
@@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from openstack import exceptions as sdk_exc
|
||||
from osc_lib import exceptions as exc
|
||||
from osc_lib import utils
|
||||
|
@@ -10,9 +10,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from openstack import exceptions as sdk_exc
|
||||
from osc_lib import exceptions as exc
|
||||
from unittest import mock
|
||||
|
||||
from senlinclient.tests.unit.v1 import fakes
|
||||
from senlinclient.v1 import profile_type as osc_profile_type
|
||||
|
@@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from openstack import exceptions as sdk_exc
|
||||
from osc_lib import exceptions as exc
|
||||
from osc_lib import utils
|
||||
|
@@ -9,7 +9,7 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from senlinclient.tests.unit.v1 import fakes
|
||||
from senlinclient.v1 import service as osc_service
|
||||
|
@@ -8,7 +8,6 @@ hacking>=1.1.0,<1.2.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
requests-mock>=1.2.0 # Apache-2.0
|
||||
mock>=2.0.0 # BSD
|
||||
python-openstackclient>=3.12.0 # Apache-2.0
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=36.2.0,>=21.0.0 # PSF/ZPL
|
||||
|
Reference in New Issue
Block a user