Fix import order in cloud tests

Remove tox filter

Change-Id: I298e3f0d5a2c53fbe31c56dfecf6ea54676c564e
This commit is contained in:
Riccardo Pittau 2021-06-01 11:42:47 +02:00 committed by Artem Goncharov
parent e0d54c0ac4
commit 2d56b681fe
31 changed files with 51 additions and 37 deletions

View File

@ -10,10 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from openstack.tests.unit import base
import copy
import uuid
from openstack.tests.unit import base
DEP_UUID = uuid.uuid4().hex
DEP_DICT = {
'uuid': DEP_UUID,

View File

@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from openstack.tests.unit import base
from openstack.tests import fakes
from openstack.tests.unit import base
class TestAggregate(base.TestCase):

View File

@ -11,9 +11,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from openstack.tests.unit import base
from openstack.tests import fakes
from openstack.tests.unit import base
_fake_zone_list = {

View File

@ -9,6 +9,7 @@
# 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 concurrent
import time
@ -16,14 +17,14 @@ import testtools
from testscenarios import load_tests_apply_scenarios as load_tests # noqa
import openstack
import openstack.cloud
from openstack.block_storage.v3 import volume as _volume
import openstack.cloud
from openstack.cloud import meta
from openstack.compute.v2 import flavor as _flavor
from openstack.network.v2 import port as _port
from openstack import exceptions
from openstack.identity.v3 import project as _project
from openstack.identity.v3 import user as _user
from openstack import exceptions
from openstack.network.v2 import port as _port
from openstack.tests import fakes
from openstack.tests.unit import base
from openstack.tests.unit.cloud import test_port

View File

@ -10,11 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
import munch
import testtools
import openstack.cloud
import testtools
from openstack.tests.unit import base

View File

@ -16,13 +16,14 @@ test_create_server
Tests for the `create_server` command.
"""
import base64
from unittest import mock
import uuid
from openstack import connection
from openstack.cloud import exc
from openstack.cloud import meta
from openstack import connection
from openstack.tests import fakes
from openstack.tests.unit import base

View File

@ -21,9 +21,10 @@ Tests Keystone endpoints commands.
import uuid
from openstack.tests.unit import base
from testtools import matchers
from openstack.tests.unit import base
class TestCloudEndpoints(base.TestCase):

View File

@ -21,8 +21,8 @@ Tests floating IP resource methods for Neutron and Nova-network.
from unittest.mock import patch
from openstack import connection
from openstack.cloud import meta
from openstack import connection
from openstack.tests import fakes
from openstack.tests.unit import base

View File

@ -21,6 +21,7 @@ Tests Floating IP resource methods for Neutron
import copy
import datetime
import munch
from openstack.cloud import exc

View File

@ -20,8 +20,8 @@ Test floating IP pool resource (managed by nova)
"""
from openstack.cloud.exc import OpenStackCloudException
from openstack.tests.unit import base
from openstack.tests import fakes
from openstack.tests.unit import base
class TestFloatingIPPool(base.TestCase):

View File

@ -9,13 +9,14 @@
# 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 copy import deepcopy
from unittest import mock
from openstack import exceptions
from openstack.network.v2.firewall_group import FirewallGroup
from openstack.network.v2.firewall_rule import FirewallRule
from openstack.network.v2.firewall_policy import FirewallPolicy
from openstack.network.v2.firewall_rule import FirewallRule
from openstack.tests.unit import base

View File

@ -12,10 +12,10 @@
# limitations under the License.
import testtools
from testtools import matchers
import openstack.cloud
from openstack.tests.unit import base
from testtools import matchers
RAW_ROLE_ASSIGNMENTS = [

View File

@ -11,17 +11,19 @@
# 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 io
import operator
import tempfile
import uuid
from openstack import exceptions
from openstack.cloud import exc
from openstack.cloud import meta
from openstack import exceptions
from openstack.tests import fakes
from openstack.tests.unit import base
IMPORT_METHODS = 'glance-direct,web-download'

View File

@ -14,11 +14,12 @@
from unittest import mock
from openstack import connection
from openstack.cloud import meta
from openstack import connection
from openstack.tests import fakes
from openstack.tests.unit import base
PRIVATE_V4 = '198.51.100.3'
PUBLIC_V4 = '192.0.2.99'
PUBLIC_V6 = '2001:0db8:face:0da0:face::0b00:1c' # rfc3849

View File

@ -11,6 +11,7 @@
# limitations under the License.
import copy
import testtools
import openstack

View File

@ -18,8 +18,8 @@ from unittest import mock
import testtools
import openstack.cloud
import openstack.cloud.openstackcloud as oc_oc
from openstack.cloud import exc
import openstack.cloud.openstackcloud as oc_oc
from openstack import exceptions
from openstack.object_store.v1 import _proxy
from openstack.object_store.v1 import container

View File

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

View File

@ -10,9 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
import uuid
import testtools
from testtools import matchers
import uuid
import openstack.cloud
import openstack.cloud._utils

View File

@ -9,9 +9,9 @@
# 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 openstack import exceptions
from openstack.tests.unit import base
from openstack.tests.unit.cloud import test_zone

View File

@ -11,11 +11,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from openstack.cloud import exc
from openstack.tests.unit import base
import testtools
from testtools import matchers
from openstack.cloud import exc
from openstack.tests.unit import base
class TestRoleAssignment(base.TestCase):

View File

@ -14,11 +14,12 @@
# limitations under the License.
import copy
import testtools
from openstack.cloud import exc
from openstack.network.v2 import router as _router
from openstack.network.v2 import port as _port
from openstack.network.v2 import router as _router
from openstack.tests.unit import base

View File

@ -14,8 +14,9 @@
import copy
import openstack.cloud
from openstack.tests.unit import base
from openstack.tests import fakes
from openstack.tests.unit import base
# TODO(mordred): Move id and name to using a getUniqueString() value

View File

@ -10,11 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
import uuid
from openstack.tests.unit import base
from openstack.tests import fakes
from openstack.tests.unit import base
class TestServerConsole(base.TestCase):

View File

@ -13,8 +13,8 @@
import uuid
from openstack.tests.unit import base
from openstack.tests import fakes
from openstack.tests.unit import base
class TestServerGroup(base.TestCase):

View File

@ -19,9 +19,10 @@ test_cloud_services
Tests Keystone services commands.
"""
from testtools import matchers
from openstack.cloud.exc import OpenStackCloudException
from openstack.tests.unit import base
from testtools import matchers
class CloudServices(base.TestCase):

View File

@ -10,9 +10,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from openstack.tests.unit import base
import uuid
from openstack.tests.unit import base
IDENTIFIER = str(uuid.uuid4())
MANILA_AZ_DICT = {
"id": IDENTIFIER,

View File

@ -10,16 +10,15 @@
# License for the specific language governing permissions and limitations
# under the License.
import tempfile
import testtools
import openstack.cloud
from openstack.orchestration.v1 import stack
from openstack.tests import fakes
from openstack.tests.unit import base
from openstack.orchestration.v1 import stack
class TestStack(base.TestCase):

View File

@ -14,6 +14,7 @@
# limitations under the License.
import copy
import testtools
from openstack.cloud import exc

View File

@ -13,8 +13,8 @@
import testtools
import openstack.cloud
from openstack.block_storage.v3 import volume
import openstack.cloud
from openstack.cloud import meta
from openstack.compute.v2 import volume_attachment
from openstack.tests import fakes

View File

@ -9,11 +9,11 @@
# 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 openstack.tests.unit import base
from openstack import exceptions
from openstack.tests.unit import base
zone_dict = {

View File

@ -123,7 +123,6 @@ show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,openstack/_services_mixin.py
per-file-ignores =
openstack/tests/unit/block_storage/*:H306,I100,I201,I202
openstack/tests/unit/cloud/*:H306,I100,I201,I202
[flake8:local-plugins]
extension =