Fix and enable F811 pep8 rule (redefinitions)

Change-Id: I4578a6ee77e2c875fa0be03763a5176fc0075198
Related-Bug: #1333290
This commit is contained in:
vponomaryov 2014-07-07 18:34:03 +03:00 committed by Valeriy Ponomaryov
parent bd9c27914b
commit 3d09e37aa0
3 changed files with 6 additions and 5 deletions

View File

@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from manilaclient import client
from manilaclient import client as httpclient
from manilaclient.v1 import limits
from manilaclient.v1 import quota_classes
from manilaclient.v1 import quotas
@ -68,7 +68,7 @@ class Client(object):
setattr(self, extension.name,
extension.manager_class(self))
self.client = client.HTTPClient(
self.client = httpclient.HTTPClient(
username,
password,
project_id,

View File

@ -440,7 +440,7 @@ class SecretsHelperTestCase(utils.TestCase):
return_value='fake_token|fake_url|fake_tenant_id')).start()
self.addCleanup(mock.patch.stopall)
def test_validate_string_void_string(self):
def test_validate_string_empty_string(self):
self.assertFalse(self.helper._validate_string(''))
def test_validate_string_void_string(self):
@ -510,7 +510,7 @@ class SecretsHelperTestCase(utils.TestCase):
self.helper = shell.SecretsHelper(self.args, self.cs.client)
self.assertIsNone(self.helper.auth_token)
def test_management_url_os_cache_true(self):
def test_auth_token_os_cache_true(self):
self.assertEqual(self.helper.auth_token, 'fake_token')
expected_key = 'http://111.11.11.11:5000/user/project/region/' \
'publicURL/share/fake/fake'

View File

@ -28,6 +28,7 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
downloadcache = ~/cache/pip
[flake8]
ignore = F811,F821
# F821: undefined name
ignore = F821
builtins = _
exclude = .venv,.tox,dist,doc,openstack,*egg