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: I564357caf5982a0db9be01c77e9e8c42bee932d6 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
@@ -9,4 +9,3 @@ oslotest>=3.3.0 # Apache-2.0
|
|||||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||||
testscenarios>=0.5.0 # Apache-2.0/BSD
|
testscenarios>=0.5.0 # Apache-2.0/BSD
|
||||||
testtools>=2.3.0 # MIT
|
testtools>=2.3.0 # MIT
|
||||||
mock>=2.0.0 # BSD
|
|
||||||
|
|||||||
@@ -14,10 +14,10 @@
|
|||||||
|
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from argparse import ArgumentTypeError
|
from argparse import ArgumentTypeError
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import mock
|
|
||||||
from testtools import ExpectedException
|
from testtools import ExpectedException
|
||||||
|
|
||||||
from vitrageclient.tests.cli.base import CliTestCase
|
from vitrageclient.tests.cli.base import CliTestCase
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from argparse import ArgumentTypeError
|
from argparse import ArgumentTypeError
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import mock
|
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import six
|
import six
|
||||||
from testtools import ExpectedException
|
from testtools import ExpectedException
|
||||||
|
|||||||
@@ -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 oslotest import base
|
from oslotest import base
|
||||||
|
|
||||||
from vitrageclient import exceptions as exc
|
from vitrageclient import exceptions as exc
|
||||||
|
|||||||
Reference in New Issue
Block a user