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: I798eb2f2581cfca60c8c59fb35eb69f82cc963c4
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 12:01:25 -05:00
parent a92ba65de0
commit 8b72e8bd5e
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
6 changed files with 8 additions and 16 deletions

View File

@ -5,7 +5,6 @@
hacking>=1.1.0,<1.2.0 # Apache-2.0 hacking>=1.1.0,<1.2.0 # Apache-2.0
coverage>=3.6 coverage>=3.6
ddt>=0.7.0 ddt>=0.7.0
mock>=1.2
python-subunit>=0.0.18 python-subunit>=0.0.18
selenium>=2.50.1 # Apache-2.0 selenium>=2.50.1 # Apache-2.0
sphinx>=1.6.2 # BSD sphinx>=1.6.2 # BSD

View File

@ -12,13 +12,12 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from unittest import mock
from django.urls import reverse from django.urls import reverse
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
import mock
from openstack_auth import policy from openstack_auth import policy
from openstack_dashboard import api as dash_api from openstack_dashboard import api as dash_api
from troveclient import common from troveclient import common
from trove_dashboard import api from trove_dashboard import api

View File

@ -15,11 +15,9 @@
# under the License. # under the License.
import logging import logging
from unittest import mock
from django.urls import reverse from django.urls import reverse
import mock
from openstack_dashboard import api from openstack_dashboard import api
from troveclient import common from troveclient import common

View File

@ -13,7 +13,7 @@
# under the License. # under the License.
import logging import logging
import mock from unittest import mock
import django import django
from django.conf import settings from django.conf import settings

View File

@ -13,17 +13,15 @@
# under the License. # under the License.
import logging import logging
from unittest import mock
from django import http from django import http
from django.urls import reverse from django.urls import reverse
from swiftclient import client as swift_client
import mock
from trove_dashboard import api from trove_dashboard import api
from trove_dashboard.test import helpers as test from trove_dashboard.test import helpers as test
from swiftclient import client as swift_client
LINES = 50 LINES = 50

View File

@ -14,14 +14,12 @@
# under the License. # under the License.
import logging import logging
import unittest
from unittest import mock
import django import django
from django import http from django import http
from django.urls import reverse from django.urls import reverse
import unittest
import mock
from horizon import exceptions from horizon import exceptions
from openstack_auth import policy from openstack_auth import policy
from openstack_dashboard import api as dash_api from openstack_dashboard import api as dash_api