Replace third party mock with unittest.mock
Now that we no longer support older version of Python, there is no need to use the third party 'mock' library for test mocking and can instead use the standard library unittest mock module. Change-Id: I1ea77249834e6c595c88f257226a483633be5f7a Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
83ef3a8117
commit
59a36b7146
@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as fixture_config
|
||||
|
||||
|
@ -19,9 +19,9 @@ import datetime
|
||||
import json as jsonlib
|
||||
import operator
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from oslo_utils import uuidutils
|
||||
import six
|
||||
from six import moves
|
||||
|
@ -16,8 +16,8 @@
|
||||
"""Test basic aodh-api app
|
||||
"""
|
||||
import json
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import six
|
||||
import wsme
|
||||
|
||||
|
@ -14,10 +14,10 @@
|
||||
# under the License.
|
||||
"""Test the methods related to complex query."""
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import jsonschema
|
||||
import mock
|
||||
from oslotest import base
|
||||
import wsme
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
# under the License.
|
||||
"""Test the methods related to query."""
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from oslo_utils import timeutils
|
||||
from oslotest import base
|
||||
import wsme
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
import os
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from gabbi import fixture
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as fixture_config
|
||||
from oslo_policy import opts
|
||||
|
@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import abc
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_db.sqlalchemy import test_migrations
|
||||
import six
|
||||
|
||||
|
@ -15,7 +15,8 @@
|
||||
# under the License.
|
||||
"""Tests for aodh/storage/
|
||||
"""
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import fixture as fixture_config
|
||||
from oslotest import base
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
"""
|
||||
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_utils import timeutils
|
||||
|
||||
from aodh import storage
|
||||
|
@ -13,7 +13,8 @@
|
||||
# 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 oslo_config import fixture
|
||||
from oslotest import base
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_utils import timeutils
|
||||
from oslotest import base
|
||||
|
||||
|
@ -12,9 +12,9 @@
|
||||
# under the License.
|
||||
"""Tests for aodh/evaluator/composite.py
|
||||
"""
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from oslo_utils import timeutils
|
||||
from oslo_utils import uuidutils
|
||||
import six
|
||||
|
@ -16,11 +16,11 @@
|
||||
import copy
|
||||
import datetime
|
||||
import json
|
||||
import six
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_utils import timeutils
|
||||
from oslo_utils import uuidutils
|
||||
import six
|
||||
|
||||
from aodh import evaluator
|
||||
from aodh.evaluator import event as event_evaluator
|
||||
|
@ -18,9 +18,9 @@ import datetime
|
||||
import fixtures
|
||||
import json
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from gnocchiclient import exceptions
|
||||
import mock
|
||||
from oslo_utils import timeutils
|
||||
from oslo_utils import uuidutils
|
||||
import pytz
|
||||
|
@ -13,8 +13,8 @@
|
||||
# limitations under the License.
|
||||
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_utils import timeutils
|
||||
from oslo_utils import uuidutils
|
||||
|
||||
|
@ -12,7 +12,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 aodh.notifier import heat as heat_notifier
|
||||
|
@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import fixture as fixture_config
|
||||
import tooz.coordination
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
"""
|
||||
import fixtures
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import fixture as fixture_config
|
||||
from stevedore import extension
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import fixture as fixture_config
|
||||
import oslo_messaging
|
||||
|
@ -15,8 +15,8 @@
|
||||
import fixtures
|
||||
import json
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as fixture_config
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user