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: I880d1d8d6183d002b81ac34e2f2a3b2625abb4ff
This commit is contained in:
jacky06 2020-04-10 13:34:34 +08:00
parent aa75c961bf
commit 7b10fd4b61
15 changed files with 13 additions and 27 deletions

View File

@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import unittest
from unittest import mock
from freezerclient import client
from freezerclient import v1

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from keystoneauth1 import loading as kaloading

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from freezerclient import exceptions
from freezerclient.v1.managers import actions

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from freezerclient import exceptions
from freezerclient.v1.managers import backups

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from freezerclient import exceptions
from freezerclient.v1.managers import clients

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from oslo_serialization import jsonutils as json

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from oslo_serialization import jsonutils as json

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from keystoneauth1 import loading as kaloading

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from freezerclient import exceptions
from freezerclient.v2.managers import actions

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from freezerclient import exceptions
from freezerclient.v2.managers import backups

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from freezerclient import exceptions
from freezerclient.v2.managers import clients

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from oslo_serialization import jsonutils as json

View File

@ -13,8 +13,7 @@
# limitations under the License.
import unittest
import mock
from unittest import mock
from oslo_serialization import jsonutils as json

View File

@ -16,7 +16,6 @@ keystoneauth1==3.4.0
linecache2==1.0.0
logilab-common==1.4.1
MarkupSafe==1.0
mock==2.0.0
monotonic==0.6
netaddr==0.7.18
netifaces==0.10.4

View File

@ -6,7 +6,6 @@
hacking>=3.0,<3.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0.0 # BSD
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
astroid==2.1.0 # LGPLv2.1