Browse Source

Merge "Use unittest.mock instead of third party mock"

tags/18.3.0
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
7eeb9e14f9
72 changed files with 103 additions and 101 deletions
  1. +2
    -2
      horizon/test/unit/hacking/test_checks.py
  2. +1
    -1
      horizon/test/unit/management/commands/test_startdash.py
  3. +1
    -1
      horizon/test/unit/management/commands/test_startpanel.py
  4. +1
    -1
      horizon/test/unit/middleware/test_base.py
  5. +2
    -2
      horizon/test/unit/middleware/test_operation_log.py
  6. +1
    -1
      horizon/test/unit/tables/test_tables.py
  7. +1
    -1
      horizon/test/unit/workflows/test_workflows.py
  8. +0
    -1
      lower-constraints.txt
  9. +2
    -1
      openstack_auth/tests/unit/test_auth.py
  10. +2
    -1
      openstack_auth/tests/unit/test_policy.py
  11. +2
    -1
      openstack_auth/tests/unit/test_user.py
  12. +1
    -1
      openstack_dashboard/dashboards/admin/aggregates/tests.py
  13. +2
    -2
      openstack_dashboard/dashboards/admin/defaults/tests.py
  14. +2
    -1
      openstack_dashboard/dashboards/admin/flavors/tests.py
  15. +2
    -2
      openstack_dashboard/dashboards/admin/hypervisors/tests.py
  16. +2
    -2
      openstack_dashboard/dashboards/admin/images/tests.py
  17. +1
    -1
      openstack_dashboard/dashboards/admin/info/tests.py
  18. +1
    -3
      openstack_dashboard/dashboards/admin/instances/tests.py
  19. +1
    -2
      openstack_dashboard/dashboards/admin/metadata_defs/tests.py
  20. +2
    -2
      openstack_dashboard/dashboards/admin/networks/agents/tests.py
  21. +1
    -2
      openstack_dashboard/dashboards/admin/networks/ports/tests.py
  22. +1
    -1
      openstack_dashboard/dashboards/admin/networks/subnets/tests.py
  23. +1
    -2
      openstack_dashboard/dashboards/admin/networks/tests.py
  24. +1
    -2
      openstack_dashboard/dashboards/admin/overview/tests.py
  25. +3
    -1
      openstack_dashboard/dashboards/admin/rbac_policies/tests.py
  26. +2
    -2
      openstack_dashboard/dashboards/admin/routers/tests.py
  27. +2
    -1
      openstack_dashboard/dashboards/admin/snapshots/tests.py
  28. +2
    -1
      openstack_dashboard/dashboards/admin/vg_snapshots/tests.py
  29. +2
    -2
      openstack_dashboard/dashboards/admin/volume_groups/tests.py
  30. +2
    -2
      openstack_dashboard/dashboards/admin/volume_types/qos_specs/tests.py
  31. +2
    -1
      openstack_dashboard/dashboards/admin/volume_types/tests.py
  32. +1
    -1
      openstack_dashboard/dashboards/identity/application_credentials/tests.py
  33. +2
    -2
      openstack_dashboard/dashboards/identity/domains/tests.py
  34. +2
    -2
      openstack_dashboard/dashboards/identity/groups/tests.py
  35. +1
    -2
      openstack_dashboard/dashboards/identity/projects/tests.py
  36. +2
    -2
      openstack_dashboard/dashboards/identity/roles/tests.py
  37. +1
    -2
      openstack_dashboard/dashboards/identity/users/tests.py
  38. +2
    -2
      openstack_dashboard/dashboards/project/floating_ips/tests.py
  39. +1
    -2
      openstack_dashboard/dashboards/project/images/images/tests.py
  40. +2
    -2
      openstack_dashboard/dashboards/project/images/snapshots/tests.py
  41. +1
    -2
      openstack_dashboard/dashboards/project/images/tests.py
  42. +1
    -1
      openstack_dashboard/dashboards/project/instances/tests.py
  43. +1
    -1
      openstack_dashboard/dashboards/project/key_pairs/tests.py
  44. +2
    -1
      openstack_dashboard/dashboards/project/network_topology/tests.py
  45. +1
    -2
      openstack_dashboard/dashboards/project/networks/ports/tests.py
  46. +2
    -1
      openstack_dashboard/dashboards/project/networks/subnets/tests.py
  47. +1
    -1
      openstack_dashboard/dashboards/project/networks/tests.py
  48. +1
    -2
      openstack_dashboard/dashboards/project/overview/tests.py
  49. +2
    -2
      openstack_dashboard/dashboards/project/routers/tests.py
  50. +1
    -1
      openstack_dashboard/dashboards/project/security_groups/tests.py
  51. +2
    -1
      openstack_dashboard/dashboards/project/snapshots/tests.py
  52. +2
    -1
      openstack_dashboard/dashboards/project/vg_snapshots/tests.py
  53. +2
    -1
      openstack_dashboard/dashboards/project/volume_groups/tests.py
  54. +1
    -2
      openstack_dashboard/dashboards/project/volumes/tests.py
  55. +1
    -1
      openstack_dashboard/dashboards/settings/password/tests.py
  56. +1
    -1
      openstack_dashboard/test/helpers.py
  57. +1
    -1
      openstack_dashboard/test/unit/api/rest/test_config.py
  58. +1
    -1
      openstack_dashboard/test/unit/api/rest/test_glance.py
  59. +2
    -1
      openstack_dashboard/test/unit/api/rest/test_keystone.py
  60. +2
    -1
      openstack_dashboard/test/unit/api/rest/test_neutron.py
  61. +1
    -1
      openstack_dashboard/test/unit/api/rest/test_nova.py
  62. +1
    -1
      openstack_dashboard/test/unit/api/rest/test_swift.py
  63. +2
    -1
      openstack_dashboard/test/unit/api/test_cinder.py
  64. +2
    -1
      openstack_dashboard/test/unit/api/test_glance.py
  65. +1
    -1
      openstack_dashboard/test/unit/api/test_keystone.py
  66. +1
    -1
      openstack_dashboard/test/unit/api/test_microversions.py
  67. +1
    -1
      openstack_dashboard/test/unit/api/test_network.py
  68. +1
    -1
      openstack_dashboard/test/unit/api/test_neutron.py
  69. +1
    -1
      openstack_dashboard/test/unit/api/test_nova.py
  70. +1
    -2
      openstack_dashboard/test/unit/api/test_swift.py
  71. +1
    -1
      openstack_dashboard/test/unit/usage/test_quotas.py
  72. +0
    -1
      test-requirements.txt

+ 2
- 2
horizon/test/unit/hacking/test_checks.py View File

@@ -11,10 +11,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

import textwrap
from unittest import mock


import mock
import pycodestyle

from horizon.hacking import checks


+ 1
- 1
horizon/test/unit/management/commands/test_startdash.py View File

@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import mock
from unittest import mock

from django.core.management import call_command
from django.core.management import CommandError


+ 1
- 1
horizon/test/unit/management/commands/test_startpanel.py View File

@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import mock
from unittest import mock

from django.core.management import call_command
from django.core.management import CommandError


+ 1
- 1
horizon/test/unit/middleware/test_base.py View File

@@ -14,8 +14,8 @@
# under the License.

import datetime
from unittest import mock

import mock
import pytz

from django.conf import settings


+ 2
- 2
horizon/test/unit/middleware/test_operation_log.py View File

@@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.

import mock
from mock import patch
from unittest import mock
from unittest.mock import patch

from django.conf import settings
from django.core.exceptions import MiddlewareNotUsed


+ 1
- 1
horizon/test/unit/tables/test_tables.py View File

@@ -16,6 +16,7 @@
# under the License.

import unittest
from unittest import mock
import uuid

from django import forms
@@ -25,7 +26,6 @@ from django.template import defaultfilters
from django.test.utils import override_settings
from django.urls import reverse
from django.utils.translation import ungettext_lazy
import mock

from horizon import exceptions
from horizon import tables


+ 1
- 1
horizon/test/unit/workflows/test_workflows.py 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 django import forms
from django import http


+ 0
- 1
lower-constraints.txt View File

@@ -47,7 +47,6 @@ kombu==4.0.0
linecache2==1.0.0
MarkupSafe==1.0
mccabe==0.2.1
mock==2.0.0
monotonic==0.6
msgpack-python==0.4.0
munch==2.1.0


+ 2
- 1
openstack_auth/tests/unit/test_auth.py View File

@@ -11,6 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from unittest import mock
import uuid

from django.conf import settings
@@ -23,7 +24,7 @@ from keystoneauth1.identity import v3 as v3_auth
from keystoneauth1 import session
from keystoneclient.v3 import client as client_v3
from keystoneclient.v3 import projects
import mock

from openstack_auth.plugin import password
from openstack_auth.tests import data_v3


+ 2
- 1
openstack_auth/tests/unit/test_policy.py View File

@@ -11,9 +11,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from unittest import mock

from django import http
from django import test
import mock

from openstack_auth import policy
from openstack_auth import user


+ 2
- 1
openstack_auth/tests/unit/test_user.py View File

@@ -11,8 +11,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from unittest import mock

from django import test
import mock

from openstack_auth import user



+ 1
- 1
openstack_dashboard/dashboards/admin/aggregates/tests.py 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 django.urls import reverse
from django.utils import html


+ 2
- 2
openstack_dashboard/dashboards/admin/defaults/tests.py View File

@@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from django.urls import reverse
from unittest import mock

import mock
from django.urls import reverse

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 2
- 1
openstack_dashboard/dashboards/admin/flavors/tests.py View File

@@ -10,10 +10,11 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

import django
from django.conf import settings
from django.urls import reverse
import mock
from novaclient.v2 import flavors

from openstack_dashboard import api


+ 2
- 2
openstack_dashboard/dashboards/admin/hypervisors/tests.py View File

@@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from django.urls import reverse
from unittest import mock

import mock
from django.urls import reverse

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 2
- 2
openstack_dashboard/dashboards/admin/images/tests.py View File

@@ -12,12 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.conf import settings
from django.test.utils import override_settings
from django.urls import reverse

import mock

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test



+ 1
- 1
openstack_dashboard/dashboards/admin/info/tests.py 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 django.urls import reverse



+ 1
- 3
openstack_dashboard/dashboards/admin/instances/tests.py View File

@@ -13,11 +13,9 @@
# under the License.

from collections import OrderedDict
from unittest import mock
import uuid

import mock

from django.conf import settings
from django.test import override_settings
from django.urls import reverse


+ 1
- 2
openstack_dashboard/dashboards/admin/metadata_defs/tests.py View File

@@ -15,11 +15,10 @@


import json
from unittest import mock

from django.urls import reverse

import mock

from openstack_dashboard import api
from openstack_dashboard.dashboards.admin.metadata_defs \
import constants


+ 2
- 2
openstack_dashboard/dashboards/admin/networks/agents/tests.py View File

@@ -13,9 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from django.urls import reverse
from unittest import mock

import mock
from django.urls import reverse

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 1
- 2
openstack_dashboard/dashboards/admin/networks/ports/tests.py View File

@@ -14,12 +14,11 @@
# under the License.

import collections
from unittest import mock

from django.test.utils import override_settings
from django.urls import reverse

import mock

from horizon.workflows import views

from openstack_dashboard import api


+ 1
- 1
openstack_dashboard/dashboards/admin/networks/subnets/tests.py View File

@@ -14,9 +14,9 @@
# under the License.

import collections
from unittest import mock

from django.urls import reverse
import mock

from horizon.workflows import views



+ 1
- 2
openstack_dashboard/dashboards/admin/networks/tests.py View File

@@ -13,12 +13,11 @@
# under the License.

import collections
from unittest import mock

from django.urls import reverse
from django.utils.http import urlunquote

import mock

from horizon import forms

from openstack_dashboard import api


+ 1
- 2
openstack_dashboard/dashboards/admin/overview/tests.py View File

@@ -17,14 +17,13 @@
# under the License.

import datetime
from unittest import mock

from django.test.utils import override_settings
from django.urls import reverse
from django.utils import encoding
from django.utils import timezone

import mock

from horizon.templatetags import sizeformat

from openstack_dashboard import api


+ 3
- 1
openstack_dashboard/dashboards/admin/rbac_policies/tests.py View File

@@ -11,8 +11,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.urls import reverse
import mock

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 2
- 2
openstack_dashboard/dashboards/admin/routers/tests.py View File

@@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from django.urls import reverse
from unittest import mock

import mock
from django.urls import reverse

from openstack_dashboard import api
from openstack_dashboard.dashboards.project.routers import tests as r_test


+ 2
- 1
openstack_dashboard/dashboards/admin/snapshots/tests.py View File

@@ -10,11 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.conf import settings
from django.test.utils import override_settings
from django.urls import reverse
from django.utils.http import urlunquote
import mock

from openstack_dashboard.api import cinder
from openstack_dashboard.api import keystone


+ 2
- 1
openstack_dashboard/dashboards/admin/vg_snapshots/tests.py View File

@@ -12,8 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.urls import reverse
import mock

from openstack_dashboard import api



+ 2
- 2
openstack_dashboard/dashboards/admin/volume_groups/tests.py View File

@@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from django.urls import reverse
from unittest import mock

import mock
from django.urls import reverse

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 2
- 2
openstack_dashboard/dashboards/admin/volume_types/qos_specs/tests.py View File

@@ -10,9 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from django.urls import reverse
from unittest import mock

import mock
from django.urls import reverse

from openstack_dashboard import api
from openstack_dashboard.dashboards.admin.volume_types.qos_specs \


+ 2
- 1
openstack_dashboard/dashboards/admin/volume_types/tests.py View File

@@ -10,8 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.urls import reverse
import mock

from horizon import exceptions



+ 1
- 1
openstack_dashboard/dashboards/identity/application_credentials/tests.py 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 django.urls import reverse



+ 2
- 2
openstack_dashboard/dashboards/identity/domains/tests.py View File

@@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from django.urls import reverse
from unittest import mock

import mock
from django.urls import reverse

from horizon.workflows import views



+ 2
- 2
openstack_dashboard/dashboards/identity/groups/tests.py View File

@@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from django.urls import reverse
from unittest import mock

import mock
from django.urls import reverse

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 1
- 2
openstack_dashboard/dashboards/identity/projects/tests.py View File

@@ -14,14 +14,13 @@

import datetime
import logging
from unittest import mock

from django.test import tag
from django.test.utils import override_settings
from django.urls import reverse
from django.utils import timezone

import mock

from horizon.workflows import views

from openstack_dashboard import api


+ 2
- 2
openstack_dashboard/dashboards/identity/roles/tests.py View File

@@ -12,9 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from django.urls import reverse
from unittest import mock

import mock
from django.urls import reverse

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 1
- 2
openstack_dashboard/dashboards/identity/users/tests.py View File

@@ -17,12 +17,11 @@
# under the License.

from socket import timeout as socket_timeout
from unittest import mock

from django.test.utils import override_settings
from django.urls import reverse

import mock

from openstack_dashboard import api
from openstack_dashboard.dashboards.identity.users import tabs
from openstack_dashboard.test import helpers as test


+ 2
- 2
openstack_dashboard/dashboards/project/floating_ips/tests.py View File

@@ -17,11 +17,11 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.urls import reverse
from django.utils.http import urlencode

import mock

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test
from openstack_dashboard.usage import quotas


+ 1
- 2
openstack_dashboard/dashboards/project/images/images/tests.py View File

@@ -17,14 +17,13 @@
# under the License.

import tempfile
from unittest import mock

from django.conf import settings
from django.core.files.uploadedfile import InMemoryUploadedFile
from django.test.utils import override_settings
from django.urls import reverse

import mock

from horizon import tables as horizon_tables
from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 2
- 2
openstack_dashboard/dashboards/project/images/snapshots/tests.py View File

@@ -16,9 +16,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from django.urls import reverse
from unittest import mock

import mock
from django.urls import reverse

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 1
- 2
openstack_dashboard/dashboards/project/images/tests.py View File

@@ -21,11 +21,10 @@ import os
from socket import timeout as socket_timeout
import tempfile
import unittest
from unittest import mock

from django.urls import reverse

import mock

from horizon import exceptions

from openstack_dashboard import api


+ 1
- 1
openstack_dashboard/dashboards/project/instances/tests.py View File

@@ -20,6 +20,7 @@ import collections
import json
import logging
import sys
from unittest import mock

from django.conf import settings
from django.forms import widgets
@@ -28,7 +29,6 @@ import django.test
from django.test.utils import override_settings
from django.urls import reverse
from django.utils.http import urlencode
import mock
from novaclient import api_versions

from horizon import exceptions


+ 1
- 1
openstack_dashboard/dashboards/project/key_pairs/tests.py View File

@@ -16,10 +16,10 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock
from urllib import parse

from django.urls import reverse
import mock

from openstack_dashboard import api
from openstack_dashboard.dashboards.project.key_pairs.forms \


+ 2
- 1
openstack_dashboard/dashboards/project/network_topology/tests.py View File

@@ -12,10 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

import django.test
from django.urls import reverse

import mock
from oslo_serialization import jsonutils

from openstack_dashboard import api


+ 1
- 2
openstack_dashboard/dashboards/project/networks/ports/tests.py View File

@@ -15,12 +15,11 @@

import collections
import copy
from unittest import mock

from django.test.utils import override_settings
from django.urls import reverse

import mock

from openstack_auth import utils as auth_utils

from horizon.workflows import views


+ 2
- 1
openstack_dashboard/dashboards/project/networks/subnets/tests.py View File

@@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.urls import reverse
import mock

from horizon.workflows import views



+ 1
- 1
openstack_dashboard/dashboards/project/networks/tests.py View File

@@ -13,11 +13,11 @@
# under the License.

import collections
from unittest import mock

from django.urls import reverse
from django.utils.html import escape
from django.utils.http import urlunquote
import mock

from horizon.workflows import views



+ 1
- 2
openstack_dashboard/dashboards/project/overview/tests.py View File

@@ -18,13 +18,12 @@

import datetime
import logging
from unittest import mock

from django.test.utils import override_settings
from django.urls import reverse
from django.utils import timezone

import mock

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test
from openstack_dashboard import usage


+ 2
- 2
openstack_dashboard/dashboards/project/routers/tests.py View File

@@ -11,12 +11,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

import copy
from unittest import mock

from django.urls import reverse

import mock

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test
from openstack_dashboard.usage import quotas


+ 1
- 1
openstack_dashboard/dashboards/project/security_groups/tests.py View File

@@ -16,7 +16,7 @@
# License for the specific language governing permissions and limitations
# under the License.

import mock
from unittest import mock

from django.conf import settings
from django.urls import reverse


+ 2
- 1
openstack_dashboard/dashboards/project/snapshots/tests.py View File

@@ -16,11 +16,12 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.conf import settings
from django.test.utils import override_settings
from django.urls import reverse
from django.utils.http import urlunquote
import mock

from openstack_dashboard import api
from openstack_dashboard.dashboards.project.snapshots \


+ 2
- 1
openstack_dashboard/dashboards/project/vg_snapshots/tests.py View File

@@ -10,8 +10,9 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.urls import reverse
import mock

from openstack_dashboard.api import cinder
from openstack_dashboard.test import helpers as test


+ 2
- 1
openstack_dashboard/dashboards/project/volume_groups/tests.py View File

@@ -10,9 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.urls import reverse
from django.utils.http import urlunquote
import mock

from openstack_dashboard.api import cinder
from openstack_dashboard.test import helpers as test


+ 1
- 2
openstack_dashboard/dashboards/project/volumes/tests.py View File

@@ -13,8 +13,7 @@
# under the License.

import copy

import mock
from unittest import mock

from django.conf import settings
from django.forms import widgets


+ 1
- 1
openstack_dashboard/dashboards/settings/password/tests.py View File

@@ -12,13 +12,13 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock
from urllib.parse import urlsplit

from django.conf import settings
from django import http
from django.urls import reverse

import mock

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 1
- 1
openstack_dashboard/test/helpers.py View File

@@ -21,6 +21,7 @@ import importlib
import logging
import os
import traceback
from unittest import mock

from django.conf import settings
from django.contrib.messages.storage import default_storage
@@ -30,7 +31,6 @@ from django.test import tag
from django import urls
from django.utils import http

import mock
from openstack_auth import user
from openstack_auth import utils
from requests.packages.urllib3.connection import HTTPConnection


+ 1
- 1
openstack_dashboard/test/unit/api/rest/test_config.py View File

@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import mock
from unittest import mock

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 1
- 1
openstack_dashboard/test/unit/api/rest/test_glance.py View File

@@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock

from openstack_dashboard import api
from openstack_dashboard.api.rest import glance


+ 2
- 1
openstack_dashboard/test/unit/api/rest/test_keystone.py View File

@@ -12,8 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from unittest import mock

from django.conf import settings
import mock
from oslo_serialization import jsonutils

from openstack_dashboard import api


+ 2
- 1
openstack_dashboard/test/unit/api/rest/test_neutron.py View File

@@ -13,8 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from unittest import mock

from django.http import request as django_request
import mock

from openstack_dashboard import api
from openstack_dashboard.api import base


+ 1
- 1
openstack_dashboard/test/unit/api/rest/test_nova.py View File

@@ -14,10 +14,10 @@

import json
from json import loads as to_json
from unittest import mock
import uuid

from django.conf import settings
import mock

from openstack_dashboard import api
from openstack_dashboard.api.base import Quota


+ 1
- 1
openstack_dashboard/test/unit/api/rest/test_swift.py View File

@@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock

from openstack_dashboard import api
from openstack_dashboard.api.rest import swift


+ 2
- 1
openstack_dashboard/test/unit/api/test_cinder.py View File

@@ -12,11 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.conf import settings
from django.test.utils import override_settings

import cinderclient as cinder_client
import mock

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 2
- 1
openstack_dashboard/test/unit/api/test_glance.py View File

@@ -16,9 +16,10 @@
# License for the specific language governing permissions and limitations
# under the License.

from unittest import mock

from django.conf import settings
from django.test.utils import override_settings
import mock

from openstack_dashboard import api
from openstack_dashboard.api import base


+ 1
- 1
openstack_dashboard/test/unit/api/test_keystone.py View File

@@ -17,8 +17,8 @@
# under the License.

from __future__ import absolute_import
from unittest import mock

import mock

from openstack_dashboard import api
from openstack_dashboard.test import helpers as test


+ 1
- 1
openstack_dashboard/test/unit/api/test_microversions.py View File

@@ -11,8 +11,8 @@
# under the License.

import unittest
from unittest import mock

import mock

from openstack_dashboard.api import microversions



+ 1
- 1
openstack_dashboard/test/unit/api/test_network.py View File

@@ -13,8 +13,8 @@
# under the License.

import collections
from unittest import mock

import mock
import netaddr

from django.test.utils import override_settings


+ 1
- 1
openstack_dashboard/test/unit/api/test_neutron.py View File

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

import mock
import netaddr
from neutronclient.common import exceptions as neutron_exc
from oslo_utils import uuidutils


+ 1
- 1
openstack_dashboard/test/unit/api/test_nova.py View File

@@ -18,11 +18,11 @@
# under the License.

from __future__ import absolute_import
from unittest import mock

from django.conf import settings
from django.test.utils import override_settings

import mock
from novaclient import api_versions
from novaclient import exceptions as nova_exceptions
from novaclient.v2 import flavor_access as nova_flavor_access


+ 1
- 2
openstack_dashboard/test/unit/api/test_swift.py View File

@@ -17,8 +17,7 @@
# under the License.

from __future__ import absolute_import

import mock
from unittest import mock

from horizon import exceptions



+ 1
- 1
openstack_dashboard/test/unit/usage/test_quotas.py View File

@@ -20,10 +20,10 @@
from __future__ import absolute_import

import collections
from unittest import mock

from django.test.utils import override_settings
from django.utils.translation import ugettext_lazy as _
import mock

from horizon import exceptions
from openstack_dashboard import api


+ 0
- 1
test-requirements.txt View File

@@ -13,7 +13,6 @@ astroid==2.1.0 # LGPLv2.1
bandit!=1.6.0,>=1.4.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
flake8-import-order==0.12 # LGPLv3
mock>=2.0.0 # BSD
nodeenv>=0.9.4 # BSD
python-memcached>=1.59 # PSF
pylint==2.2.2 # GPLv2


Loading…
Cancel
Save