Fix import order in compute unit tests

Change-Id: I775d7d37d543e306cd870b56a071f8afbbdd5bb6
This commit is contained in:
Riccardo Pittau
2021-04-22 15:09:42 +02:00
parent d1676c24d3
commit c49bbafb89
15 changed files with 16 additions and 14 deletions

View File

@@ -10,9 +10,9 @@
# 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 openstack.compute import version
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute import version
IDENTIFIER = 'IDENTIFIER' IDENTIFIER = 'IDENTIFIER'
EXAMPLE = { EXAMPLE = {

View File

@@ -10,9 +10,9 @@
# 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 openstack.compute.v2 import availability_zone as az
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute.v2 import availability_zone as az
IDENTIFIER = 'IDENTIFIER' IDENTIFIER = 'IDENTIFIER'
BASIC_EXAMPLE = { BASIC_EXAMPLE = {

View File

@@ -10,9 +10,9 @@
# 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 openstack.compute.v2 import extension
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute.v2 import extension
IDENTIFIER = 'IDENTIFIER' IDENTIFIER = 'IDENTIFIER'
EXAMPLE = { EXAMPLE = {

View File

@@ -9,13 +9,14 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# 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 unittest import mock
from keystoneauth1 import adapter from keystoneauth1 import adapter
from openstack.compute.v2 import flavor
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute.v2 import flavor
IDENTIFIER = 'IDENTIFIER' IDENTIFIER = 'IDENTIFIER'
BASIC_EXAMPLE = { BASIC_EXAMPLE = {

View File

@@ -9,15 +9,16 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# 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 copy import copy
from unittest import mock from unittest import mock
from keystoneauth1 import adapter from keystoneauth1 import adapter
from openstack.compute.v2 import hypervisor
from openstack import exceptions from openstack import exceptions
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute.v2 import hypervisor
EXAMPLE = { EXAMPLE = {
"cpu_info": { "cpu_info": {

View File

@@ -10,9 +10,9 @@
# 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 openstack.compute.v2 import image
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute.v2 import image
IDENTIFIER = 'IDENTIFIER' IDENTIFIER = 'IDENTIFIER'

View File

@@ -10,9 +10,9 @@
# 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 openstack.compute.v2 import keypair
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute.v2 import keypair
EXAMPLE = { EXAMPLE = {
'created_at': 'some_time', 'created_at': 'some_time',

View File

@@ -9,6 +9,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# 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 unittest import mock
from openstack.compute.v2 import _proxy from openstack.compute.v2 import _proxy

View File

@@ -10,9 +10,9 @@
# 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 openstack.compute.v2 import server_diagnostics
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute.v2 import server_diagnostics
IDENTIFIER = 'IDENTIFIER' IDENTIFIER = 'IDENTIFIER'
EXAMPLE = { EXAMPLE = {

View File

@@ -10,9 +10,9 @@
# 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 openstack.compute.v2 import server_group
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute.v2 import server_group
EXAMPLE = { EXAMPLE = {
'id': 'IDENTIFIER', 'id': 'IDENTIFIER',

View File

@@ -10,9 +10,9 @@
# 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 openstack.compute.v2 import server_interface
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute.v2 import server_interface
IDENTIFIER = 'IDENTIFIER' IDENTIFIER = 'IDENTIFIER'
EXAMPLE = { EXAMPLE = {

View File

@@ -14,9 +14,9 @@ from unittest import mock
from keystoneauth1 import adapter from keystoneauth1 import adapter
from openstack.compute.v2 import server_remote_console
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute.v2 import server_remote_console
IDENTIFIER = 'IDENTIFIER' IDENTIFIER = 'IDENTIFIER'
EXAMPLE = { EXAMPLE = {

View File

@@ -12,8 +12,8 @@
from unittest import mock from unittest import mock
from openstack import exceptions
from openstack.compute.v2 import service from openstack.compute.v2 import service
from openstack import exceptions
from openstack.tests.unit import base from openstack.tests.unit import base
IDENTIFIER = 'IDENTIFIER' IDENTIFIER = 'IDENTIFIER'

View File

@@ -10,9 +10,9 @@
# 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 openstack.compute.v2 import volume_attachment
from openstack.tests.unit import base from openstack.tests.unit import base
from openstack.compute.v2 import volume_attachment
EXAMPLE = { EXAMPLE = {
'device': '1', 'device': '1',

View File

@@ -132,7 +132,6 @@ per-file-ignores =
openstack/tests/unit/workflow/*:H306,I100,I201,I202 openstack/tests/unit/workflow/*:H306,I100,I201,I202
openstack/tests/unit/message/*:H306,I100,I201,I202 openstack/tests/unit/message/*:H306,I100,I201,I202
openstack/tests/unit/load_balancer/*:H306,I100,I201,I202 openstack/tests/unit/load_balancer/*:H306,I100,I201,I202
openstack/tests/unit/compute/*:H306,I100,I201,I202
[flake8:local-plugins] [flake8:local-plugins]
extension = extension =