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: I1dca4b2c7eccf1b19482dde60b88a132935b48b8
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis
2020-04-18 11:54:36 -05:00
parent 17c9300570
commit 1d4e926076
23 changed files with 23 additions and 23 deletions
-1
View File
@@ -3,7 +3,6 @@
# process, which may cause wedges in the gate later.
hacking>=3.0,<3.1.0 # Apache-2.0
bandit!=1.6.0,>=1.1.0 # Apache-2.0
mock>=2.0.0 # BSD
coverage!=4.4,>=4.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
prometheus_client
+1 -1
View File
@@ -11,9 +11,9 @@
# under the License.
import json
import mock
import os
import subprocess
from unittest import mock
import unittest
from monasca_agent.common import util
+1 -1
View File
@@ -14,10 +14,10 @@
import datetime
import logging
import mock
import os
import shutil
import tempfile
from unittest import mock
import unittest
from cryptography import x509
+1 -1
View File
@@ -11,7 +11,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import unittest
import monasca_agent.common.util as util
+1 -1
View File
@@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import unittest
import mock
import monasca_agent.collector.checks_d.ib_network as ib_network
+1 -1
View File
@@ -14,8 +14,8 @@
import os
import logging
from unittest import mock
import unittest
import mock
import json
import random
+1 -1
View File
@@ -11,7 +11,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import unittest
from monasca_agent.collector.checks_d.kubernetes_api import KubernetesAPI
+1 -1
View File
@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import unittest
from collections import defaultdict
from tempfile import mkdtemp
+1 -1
View File
@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import unittest
from collections import defaultdict
+1 -1
View File
@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslotest import base
import psutil
+1 -1
View File
@@ -11,7 +11,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import unittest
from monasca_setup.detection.plugins.host_alive import HostAlive
+1 -1
View File
@@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import unittest
import mock
import monasca_setup.detection.plugins.ib_network as ib_network
+1 -1
View File
@@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslotest import base
import psutil
+1 -1
View File
@@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslotest import base
import psutil
+1 -1
View File
@@ -14,8 +14,8 @@
import logging
import os
from unittest import mock
import unittest
import mock
import psutil
import json
import six
+1 -1
View File
@@ -13,7 +13,7 @@
# under the License.
from collections import namedtuple
import mock
from unittest import mock
import unittest
from oslo_config import cfg
+1 -1
View File
@@ -12,10 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
import random
from unittest import mock
import unittest
import logging
import mock
import psutil
import six
+1 -1
View File
@@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import os
from unittest import mock
from oslotest import base
from oslo_config import cfg
+1 -1
View File
@@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslotest import base
import psutil
+2 -1
View File
@@ -11,8 +11,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import os.path
from unittest import mock
import six
import tempfile
import unittest
+1 -1
View File
@@ -12,8 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import random
from unittest import mock
from oslotest import base
+1 -1
View File
@@ -12,7 +12,7 @@
# under the License.
import collections
import mock
from unittest import mock
import unittest
import monasca_setup
+1 -1
View File
@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import unittest
from tests.common import load_check