Take care of multiple imports and update explanation
The explanation for what's up with pep8 checks is a little different than it used to be. Get it up to current. Change-Id: I2c03a5aec02dd41ed5cdfb4c4082e17339ed2765
This commit is contained in:
parent
b34e06f81b
commit
b447fa4356
|
@ -18,16 +18,16 @@ Tests for the `create_server` command.
|
|||
"""
|
||||
|
||||
import mock
|
||||
import shade
|
||||
from shade import exc
|
||||
from shade import meta
|
||||
from shade import OpenStackCloud
|
||||
from shade.exc import (OpenStackCloudException, OpenStackCloudTimeout)
|
||||
from shade.tests import fakes
|
||||
from shade.tests.unit import base
|
||||
|
||||
|
||||
class TestCreateServer(base.RequestsMockTestCase):
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'nova_client')
|
||||
def test_create_server_with_create_exception(self, mock_nova):
|
||||
"""
|
||||
Test that an exception in the novaclient create raises an exception in
|
||||
|
@ -35,10 +35,10 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
"""
|
||||
mock_nova.servers.create.side_effect = Exception("exception")
|
||||
self.assertRaises(
|
||||
OpenStackCloudException, self.cloud.create_server,
|
||||
exc.OpenStackCloudException, self.cloud.create_server,
|
||||
'server-name', {'id': 'image-id'}, {'id': 'flavor-id'})
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'nova_client')
|
||||
def test_create_server_with_get_exception(self, mock_nova):
|
||||
"""
|
||||
Test that an exception when attempting to get the server instance via
|
||||
|
@ -48,10 +48,10 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
mock_nova.servers.create.return_value = mock.Mock(status="BUILD")
|
||||
mock_nova.servers.get.side_effect = Exception("exception")
|
||||
self.assertRaises(
|
||||
OpenStackCloudException, self.cloud.create_server,
|
||||
exc.OpenStackCloudException, self.cloud.create_server,
|
||||
'server-name', {'id': 'image-id'}, {'id': 'flavor-id'})
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'nova_client')
|
||||
def test_create_server_with_server_error(self, mock_nova):
|
||||
"""
|
||||
Test that a server error before we return or begin waiting for the
|
||||
|
@ -62,10 +62,10 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
mock_nova.servers.create.return_value = build_server
|
||||
mock_nova.servers.get.return_value = error_server
|
||||
self.assertRaises(
|
||||
OpenStackCloudException, self.cloud.create_server,
|
||||
exc.OpenStackCloudException, self.cloud.create_server,
|
||||
'server-name', {'id': 'image-id'}, {'id': 'flavor-id'})
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'nova_client')
|
||||
def test_create_server_wait_server_error(self, mock_nova):
|
||||
"""
|
||||
Test that a server error while waiting for the server to spawn
|
||||
|
@ -81,12 +81,12 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
mock_nova.servers.list.side_effect = [[build_server], [error_server]]
|
||||
mock_nova.floating_ips.list.return_value = [fake_floating_ip]
|
||||
self.assertRaises(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
self.cloud.create_server,
|
||||
'server-name', dict(id='image-id'),
|
||||
dict(id='flavor-id'), wait=True)
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'nova_client')
|
||||
def test_create_server_with_timeout(self, mock_nova):
|
||||
"""
|
||||
Test that a timeout while waiting for the server to spawn raises an
|
||||
|
@ -97,13 +97,13 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
mock_nova.servers.get.return_value = fake_server
|
||||
mock_nova.servers.list.return_value = [fake_server]
|
||||
self.assertRaises(
|
||||
OpenStackCloudTimeout,
|
||||
exc.OpenStackCloudTimeout,
|
||||
self.cloud.create_server,
|
||||
'server-name',
|
||||
dict(id='image-id'), dict(id='flavor-id'),
|
||||
wait=True, timeout=0.01)
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'nova_client')
|
||||
def test_create_server_no_wait(self, mock_nova):
|
||||
"""
|
||||
Test that create_server with no wait and no exception in the
|
||||
|
@ -124,7 +124,7 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
image=dict(id='image=id'),
|
||||
flavor=dict(id='flavor-id')))
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'nova_client')
|
||||
def test_create_server_with_admin_pass_no_wait(self, mock_nova):
|
||||
"""
|
||||
Test that a server with an admin_pass passed returns the password
|
||||
|
@ -145,8 +145,8 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
name='server-name', image=dict(id='image=id'),
|
||||
flavor=dict(id='flavor-id'), admin_pass='ooBootheiX0edoh'))
|
||||
|
||||
@mock.patch.object(OpenStackCloud, "wait_for_server")
|
||||
@mock.patch.object(OpenStackCloud, "nova_client")
|
||||
@mock.patch.object(shade.OpenStackCloud, "wait_for_server")
|
||||
@mock.patch.object(shade.OpenStackCloud, "nova_client")
|
||||
def test_create_server_with_admin_pass_wait(self, mock_nova, mock_wait):
|
||||
"""
|
||||
Test that a server with an admin_pass passed returns the password
|
||||
|
@ -176,8 +176,8 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
meta.obj_to_dict(fake_server_with_pass))
|
||||
)
|
||||
|
||||
@mock.patch.object(OpenStackCloud, "get_active_server")
|
||||
@mock.patch.object(OpenStackCloud, "get_server")
|
||||
@mock.patch.object(shade.OpenStackCloud, "get_active_server")
|
||||
@mock.patch.object(shade.OpenStackCloud, "get_server")
|
||||
def test_wait_for_server(self, mock_get_server, mock_get_active_server):
|
||||
"""
|
||||
Test that waiting for a server returns the server instance when
|
||||
|
@ -210,8 +210,8 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
|
||||
self.assertEqual('ACTIVE', server['status'])
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'wait_for_server')
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'wait_for_server')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'nova_client')
|
||||
def test_create_server_wait(self, mock_nova, mock_wait):
|
||||
"""
|
||||
Test that create_server with a wait actually does the wait.
|
||||
|
@ -229,8 +229,8 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
nat_destination=None,
|
||||
)
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'add_ips_to_server')
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'add_ips_to_server')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'nova_client')
|
||||
@mock.patch('time.sleep')
|
||||
def test_create_server_no_addresses(
|
||||
self, mock_sleep, mock_nova, mock_add_ips_to_server):
|
||||
|
@ -252,7 +252,7 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
self.cloud._SERVER_AGE = 0
|
||||
|
||||
self.assertRaises(
|
||||
OpenStackCloudException, self.cloud.create_server,
|
||||
exc.OpenStackCloudException, self.cloud.create_server,
|
||||
'server-name', {'id': 'image-id'}, {'id': 'flavor-id'},
|
||||
wait=True)
|
||||
|
||||
|
@ -283,9 +283,9 @@ class TestCreateServer(base.RequestsMockTestCase):
|
|||
network='network-name', nics=[])
|
||||
mock_get_network.assert_called_once_with(name_or_id='network-name')
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'get_server_by_id')
|
||||
@mock.patch.object(OpenStackCloud, 'get_image')
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'get_server_by_id')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'get_image')
|
||||
@mock.patch.object(shade.OpenStackCloud, 'nova_client')
|
||||
def test_create_server_get_flavor_image(
|
||||
self, mock_nova, mock_image, mock_get_server_by_id):
|
||||
|
||||
|
|
|
@ -18,16 +18,16 @@ Tests for the `create_volume_snapshot` command.
|
|||
"""
|
||||
|
||||
from mock import patch
|
||||
import shade
|
||||
from shade import exc
|
||||
from shade import meta
|
||||
from shade import OpenStackCloud
|
||||
from shade.tests import fakes
|
||||
from shade.tests.unit import base
|
||||
from shade.exc import (OpenStackCloudException, OpenStackCloudTimeout)
|
||||
|
||||
|
||||
class TestCreateVolumeSnapshot(base.TestCase):
|
||||
|
||||
@patch.object(OpenStackCloud, 'cinder_client')
|
||||
@patch.object(shade.OpenStackCloud, 'cinder_client')
|
||||
def test_create_volume_snapshot_wait(self, mock_cinder):
|
||||
"""
|
||||
Test that create_volume_snapshot with a wait returns the volume
|
||||
|
@ -56,7 +56,7 @@ class TestCreateVolumeSnapshot(base.TestCase):
|
|||
snapshot_id=meta.obj_to_dict(build_snapshot)['id']
|
||||
)
|
||||
|
||||
@patch.object(OpenStackCloud, 'cinder_client')
|
||||
@patch.object(shade.OpenStackCloud, 'cinder_client')
|
||||
def test_create_volume_snapshot_with_timeout(self, mock_cinder):
|
||||
"""
|
||||
Test that a timeout while waiting for the volume snapshot to create
|
||||
|
@ -70,7 +70,7 @@ class TestCreateVolumeSnapshot(base.TestCase):
|
|||
mock_cinder.volume_snapshots.list.return_value = [build_snapshot]
|
||||
|
||||
self.assertRaises(
|
||||
OpenStackCloudTimeout,
|
||||
exc.OpenStackCloudTimeout,
|
||||
self.cloud.create_volume_snapshot, volume_id='1234',
|
||||
wait=True, timeout=0.01)
|
||||
|
||||
|
@ -81,7 +81,7 @@ class TestCreateVolumeSnapshot(base.TestCase):
|
|||
snapshot_id=meta.obj_to_dict(build_snapshot)['id']
|
||||
)
|
||||
|
||||
@patch.object(OpenStackCloud, 'cinder_client')
|
||||
@patch.object(shade.OpenStackCloud, 'cinder_client')
|
||||
def test_create_volume_snapshot_with_error(self, mock_cinder):
|
||||
"""
|
||||
Test that a error status while waiting for the volume snapshot to
|
||||
|
@ -97,7 +97,7 @@ class TestCreateVolumeSnapshot(base.TestCase):
|
|||
mock_cinder.volume_snapshots.list.return_value = [error_snapshot]
|
||||
|
||||
self.assertRaises(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
self.cloud.create_volume_snapshot, volume_id='1234',
|
||||
wait=True, timeout=5)
|
||||
|
||||
|
|
|
@ -18,15 +18,15 @@ Tests for the `delete_volume_snapshot` command.
|
|||
"""
|
||||
|
||||
from mock import patch
|
||||
from shade import OpenStackCloud
|
||||
import shade
|
||||
from shade import exc
|
||||
from shade.tests import fakes
|
||||
from shade.tests.unit import base
|
||||
from shade.exc import (OpenStackCloudException, OpenStackCloudTimeout)
|
||||
|
||||
|
||||
class TestDeleteVolumeSnapshot(base.TestCase):
|
||||
|
||||
@patch.object(OpenStackCloud, 'cinder_client')
|
||||
@patch.object(shade.OpenStackCloud, 'cinder_client')
|
||||
def test_delete_volume_snapshot(self, mock_cinder):
|
||||
"""
|
||||
Test that delete_volume_snapshot without a wait returns True instance
|
||||
|
@ -45,7 +45,7 @@ class TestDeleteVolumeSnapshot(base.TestCase):
|
|||
mock_cinder.volume_snapshots.list.assert_called_with(detailed=True,
|
||||
search_opts=None)
|
||||
|
||||
@patch.object(OpenStackCloud, 'cinder_client')
|
||||
@patch.object(shade.OpenStackCloud, 'cinder_client')
|
||||
def test_delete_volume_snapshot_with_error(self, mock_cinder):
|
||||
"""
|
||||
Test that a exception while deleting a volume snapshot will cause an
|
||||
|
@ -59,13 +59,13 @@ class TestDeleteVolumeSnapshot(base.TestCase):
|
|||
mock_cinder.volume_snapshots.list.return_value = [fake_snapshot]
|
||||
|
||||
self.assertRaises(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
self.cloud.delete_volume_snapshot, name_or_id='1234')
|
||||
|
||||
mock_cinder.volume_snapshots.delete.assert_called_with(
|
||||
snapshot='1234')
|
||||
|
||||
@patch.object(OpenStackCloud, 'cinder_client')
|
||||
@patch.object(shade.OpenStackCloud, 'cinder_client')
|
||||
def test_delete_volume_snapshot_with_timeout(self, mock_cinder):
|
||||
"""
|
||||
Test that a timeout while waiting for the volume snapshot to delete
|
||||
|
@ -77,7 +77,7 @@ class TestDeleteVolumeSnapshot(base.TestCase):
|
|||
mock_cinder.volume_snapshots.list.return_value = [fake_snapshot]
|
||||
|
||||
self.assertRaises(
|
||||
OpenStackCloudTimeout,
|
||||
exc.OpenStackCloudTimeout,
|
||||
self.cloud.delete_volume_snapshot, name_or_id='1234',
|
||||
wait=True, timeout=0.01)
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@ Tests for the `rebuild_server` command.
|
|||
|
||||
import mock
|
||||
|
||||
from shade import exc
|
||||
from shade import meta
|
||||
from shade import OpenStackCloud
|
||||
from shade.exc import (OpenStackCloudException, OpenStackCloudTimeout)
|
||||
from shade.tests import fakes
|
||||
from shade.tests.unit import base
|
||||
|
||||
|
@ -38,7 +38,7 @@ class TestRebuildServer(base.TestCase):
|
|||
"""
|
||||
mock_nova.servers.rebuild.side_effect = Exception("exception")
|
||||
self.assertRaises(
|
||||
OpenStackCloudException, self.cloud.rebuild_server, "a", "b")
|
||||
exc.OpenStackCloudException, self.cloud.rebuild_server, "a", "b")
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
def test_rebuild_server_server_error(self, mock_nova):
|
||||
|
@ -55,7 +55,7 @@ class TestRebuildServer(base.TestCase):
|
|||
mock_nova.servers.list.return_value = [error_server]
|
||||
mock_nova.floating_ips.list.return_value = [fake_floating_ip]
|
||||
self.assertRaises(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
self.cloud.rebuild_server, "1234", "b", wait=True)
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
|
@ -68,7 +68,7 @@ class TestRebuildServer(base.TestCase):
|
|||
mock_nova.servers.rebuild.return_value = rebuild_server
|
||||
mock_nova.servers.list.return_value = [rebuild_server]
|
||||
self.assertRaises(
|
||||
OpenStackCloudTimeout,
|
||||
exc.OpenStackCloudTimeout,
|
||||
self.cloud.rebuild_server, "a", "b", wait=True, timeout=0.001)
|
||||
|
||||
@mock.patch.object(OpenStackCloud, 'nova_client')
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
from mock import patch
|
||||
import os_client_config as occ
|
||||
from shade import OperatorCloud
|
||||
from shade.exc import OpenStackCloudException, OpenStackCloudTimeout
|
||||
from shade import exc
|
||||
from shade.meta import obj_to_dict
|
||||
from shade.tests import fakes
|
||||
from shade.tests.unit import base
|
||||
|
@ -588,7 +588,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_keystone.roles.list.return_value = []
|
||||
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Role {0} not found'.format(self.fake_role['name'])
|
||||
):
|
||||
self.op_cloud.grant_role(
|
||||
|
@ -602,7 +602,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_api_version.return_value = '3'
|
||||
mock_keystone.roles.list.return_value = []
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Role {0} not found'.format(self.fake_role['name'])
|
||||
):
|
||||
self.op_cloud.revoke_role(
|
||||
|
@ -618,7 +618,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_api_version.return_value = '3'
|
||||
mock_keystone.roles.list.return_value = [self.fake_role]
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Must specify either a user or a group'
|
||||
):
|
||||
self.op_cloud.grant_role(self.fake_role['name'])
|
||||
|
@ -631,7 +631,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_api_version.return_value = '3'
|
||||
mock_keystone.roles.list.return_value = [self.fake_role]
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Must specify either a user or a group'
|
||||
):
|
||||
self.op_cloud.revoke_role(self.fake_role['name'])
|
||||
|
@ -643,7 +643,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_keystone.roles.list.return_value = [self.fake_role]
|
||||
mock_keystone.users.list.return_value = []
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Must specify either a user or a group'
|
||||
):
|
||||
self.op_cloud.grant_role(
|
||||
|
@ -657,7 +657,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_keystone.roles.list.return_value = [self.fake_role]
|
||||
mock_keystone.users.list.return_value = []
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Must specify either a user or a group'
|
||||
):
|
||||
self.op_cloud.revoke_role(
|
||||
|
@ -672,7 +672,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_keystone.users.list.return_value = [self.fake_user]
|
||||
mock_keystone.groups.list.return_value = [self.fake_group]
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Specify either a group or a user, not both'
|
||||
):
|
||||
self.op_cloud.grant_role(
|
||||
|
@ -688,7 +688,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_keystone.users.list.return_value = [self.fake_user]
|
||||
mock_keystone.groups.list.return_value = [self.fake_group]
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Specify either a group or a user, not both'
|
||||
):
|
||||
self.op_cloud.revoke_role(
|
||||
|
@ -748,7 +748,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_keystone.projects.list.return_value = []
|
||||
mock_keystone.domains.get.return_value = None
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Must specify either a domain or project'
|
||||
):
|
||||
self.op_cloud.grant_role(
|
||||
|
@ -768,7 +768,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_keystone.role_assignments.list.return_value = \
|
||||
[self.user_project_assignment]
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Must specify either a domain or project'
|
||||
):
|
||||
self.op_cloud.revoke_role(
|
||||
|
@ -784,7 +784,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_keystone.roles.list.return_value = [self.fake_role]
|
||||
mock_keystone.domains.get.side_effect = Exception('test')
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Failed to get domain baddomain \(Inner Exception: test\)'
|
||||
):
|
||||
self.op_cloud.grant_role(
|
||||
|
@ -801,7 +801,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_keystone.roles.list.return_value = [self.fake_role]
|
||||
mock_keystone.domains.get.side_effect = Exception('test')
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudException,
|
||||
exc.OpenStackCloudException,
|
||||
'Failed to get domain baddomain \(Inner Exception: test\)'
|
||||
):
|
||||
self.op_cloud.revoke_role(
|
||||
|
@ -841,7 +841,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_keystone.roles.add_user_role.return_value = self.fake_role
|
||||
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudTimeout,
|
||||
exc.OpenStackCloudTimeout,
|
||||
'Timeout waiting for role to be granted'
|
||||
):
|
||||
self.assertTrue(self.op_cloud.grant_role(
|
||||
|
@ -879,7 +879,7 @@ class TestRoleAssignment(base.TestCase):
|
|||
mock_keystone.roles.roles_for_user.return_value = [self.fake_role]
|
||||
mock_keystone.roles.remove_user_role.return_value = self.fake_role
|
||||
with testtools.ExpectedException(
|
||||
OpenStackCloudTimeout,
|
||||
exc.OpenStackCloudTimeout,
|
||||
'Timeout waiting for role to be revoked'
|
||||
):
|
||||
self.assertTrue(self.op_cloud.revoke_role(
|
||||
|
|
|
@ -15,8 +15,8 @@ import mock
|
|||
import testtools
|
||||
|
||||
import shade
|
||||
from shade.tests.unit import base
|
||||
from shade.tests import fakes
|
||||
from shade.tests.unit import base
|
||||
|
||||
|
||||
zone_obj = fakes.FakeZone(
|
||||
|
|
10
tox.ini
10
tox.ini
|
@ -67,9 +67,13 @@ commands = python setup.py build_sphinx
|
|||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[flake8]
|
||||
# The string of H ignores is because there are some useful checks
|
||||
# related to python3 compat.
|
||||
ignore = H3,H4,H103
|
||||
# The following are ignored on purpose - please do not submit patches to "fix"
|
||||
# without first verifying with a core that fixing them is non-disruptive.
|
||||
# H103 Is about the Apache license. It's strangely strict about the use of
|
||||
# single vs double quotes in the license text. Fixing is not worth it
|
||||
# H306 Is about alphabetical imports - there's a lot to fix
|
||||
# H4 Are about docstrings - and there's just too many of them to fix
|
||||
ignore = H103,H306,H4
|
||||
show-source = True
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||
|
|
Loading…
Reference in New Issue