Merge "Use unittest.mock instead of third party mock"
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from monasca_api import config
|
from monasca_api import config
|
||||||
from monasca_api.tests import base
|
from monasca_api.tests import base
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import monasca_api.db.fingerprint as fingerprint
|
import monasca_api.db.fingerprint as fingerprint
|
||||||
from monasca_api.tests import base
|
from monasca_api.tests import base
|
||||||
|
@@ -14,8 +14,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
|
||||||
import requests_mock
|
import requests_mock
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from oslo_context import context
|
from oslo_context import context
|
||||||
from oslo_policy import policy as os_policy
|
from oslo_policy import policy as os_policy
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from monasca_api import config
|
from monasca_api import config
|
||||||
from monasca_api.healthcheck import alarms_db_check as rdc
|
from monasca_api.healthcheck import alarms_db_check as rdc
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import falcon
|
import falcon
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from monasca_api import config
|
from monasca_api import config
|
||||||
from monasca_api.healthcheck import base
|
from monasca_api.healthcheck import base
|
||||||
|
@@ -12,7 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from six import PY3
|
from six import PY3
|
||||||
|
|
||||||
from monasca_common.kafka_lib import client
|
from monasca_common.kafka_lib import client
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from monasca_api.healthcheck import keystone_protocol
|
from monasca_api.healthcheck import keystone_protocol
|
||||||
from monasca_api.tests import base
|
from monasca_api.tests import base
|
||||||
|
@@ -16,8 +16,8 @@
|
|||||||
import copy
|
import copy
|
||||||
import datetime
|
import datetime
|
||||||
import random
|
import random
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
|
@@ -13,8 +13,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import falcon
|
import falcon
|
||||||
import mock
|
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from monasca_api.tests import base
|
from monasca_api.tests import base
|
||||||
from monasca_api.v2.reference import logs
|
from monasca_api.v2.reference import logs
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
import json
|
import json
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from monasca_api.common.messaging.message_formats.metrics import transform
|
from monasca_api.common.messaging.message_formats.metrics import transform
|
||||||
from monasca_api.tests import base
|
from monasca_api.tests import base
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from monasca_common.simport import simport
|
from monasca_common.simport import simport
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from oslotest import base
|
from oslotest import base
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import falcon
|
import falcon
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from monasca_api.tests import base
|
from monasca_api.tests import base
|
||||||
import monasca_api.v2.common.exceptions as common_exceptions
|
import monasca_api.v2.common.exceptions as common_exceptions
|
||||||
|
@@ -11,7 +11,6 @@ cassandra-driver!=3.6.0,>=3.3.0 # Apache-2.0
|
|||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
httplib2>=0.9.1 # MIT
|
httplib2>=0.9.1 # MIT
|
||||||
influxdb>=2.9.2 # MIT
|
influxdb>=2.9.2 # MIT
|
||||||
mock>=2.0.0 # BSD
|
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
requests-mock>=1.2.0 # Apache-2.0
|
requests-mock>=1.2.0 # Apache-2.0
|
||||||
stestr>=1.0.0 # Apache-2.0
|
stestr>=1.0.0 # Apache-2.0
|
||||||
|
Reference in New Issue
Block a user