update hacking checks for manila

Manila hacking checks were picked up in the fork from cinder
and still contain a number of references to cinder.  This
commit cleans up this issue.

Trivial fix.

Change-Id: I3c8eda7f2b57b304616bbe7d1f3e616f7e0504ea
This commit is contained in:
Tom Barron 2016-04-07 09:45:24 -04:00
parent 692bd3ea03
commit 4f26ecd4ad

View File

@ -70,41 +70,41 @@ class HackingTestCase(test.TestCase):
def test_check_explicit_underscore_import(self):
self.assertEqual(1, len(list(checks.check_explicit_underscore_import(
"LOG.info(_('My info message'))",
"cinder/tests/other_files.py"))))
"manila/tests/other_files.py"))))
self.assertEqual(1, len(list(checks.check_explicit_underscore_import(
"msg = _('My message')",
"cinder/tests/other_files.py"))))
"manila/tests/other_files.py"))))
self.assertEqual(0, len(list(checks.check_explicit_underscore_import(
"from cinder.i18n import _",
"cinder/tests/other_files.py"))))
"from manila.i18n import _",
"manila/tests/other_files.py"))))
self.assertEqual(0, len(list(checks.check_explicit_underscore_import(
"LOG.info(_('My info message'))",
"cinder/tests/other_files.py"))))
"manila/tests/other_files.py"))))
self.assertEqual(0, len(list(checks.check_explicit_underscore_import(
"msg = _('My message')",
"cinder/tests/other_files.py"))))
"manila/tests/other_files.py"))))
self.assertEqual(0, len(list(checks.check_explicit_underscore_import(
"from cinder.i18n import _LE, _, _LW",
"cinder/tests/other_files2.py"))))
"from manila.i18n import _LE, _, _LW",
"manila/tests/other_files2.py"))))
self.assertEqual(0, len(list(checks.check_explicit_underscore_import(
"msg = _('My message')",
"cinder/tests/other_files2.py"))))
"manila/tests/other_files2.py"))))
self.assertEqual(0, len(list(checks.check_explicit_underscore_import(
"_ = translations.ugettext",
"cinder/tests/other_files3.py"))))
"manila/tests/other_files3.py"))))
self.assertEqual(0, len(list(checks.check_explicit_underscore_import(
"msg = _('My message')",
"cinder/tests/other_files3.py"))))
"manila/tests/other_files3.py"))))
# Complete code coverage by falling through all checks
self.assertEqual(0, len(list(checks.check_explicit_underscore_import(
"LOG.info('My info message')",
"cinder.tests.unit/other_files4.py"))))
"manila.tests.unit/other_files4.py"))))
self.assertEqual(0, len(list(checks.check_explicit_underscore_import(
"from cinder.i18n import _LW",
"cinder.tests.unit/other_files5.py"))))
"from manila.i18n import _LW",
"manila.tests.unit/other_files5.py"))))
self.assertEqual(1, len(list(checks.check_explicit_underscore_import(
"msg = _('My message')",
"cinder.tests.unit/other_files5.py"))))
"manila.tests.unit/other_files5.py"))))
# We are patching pep8 so that only the check under test is actually
# installed.