Fix some pylint warnings
This commit is contained in:
parent
c15f3c89fa
commit
47a3980b12
@ -218,8 +218,8 @@ class LoraxTemplateRunner(object):
|
||||
# log the "ErrorType: this is what happened" line
|
||||
logger.error(" " + exclines[-1].strip())
|
||||
# and log the entire traceback to the debug log
|
||||
for line in ''.join(exclines).splitlines():
|
||||
logger.debug(" " + line)
|
||||
for l in ''.join(exclines).splitlines():
|
||||
logger.debug(" " + l)
|
||||
if self.fatalerrors:
|
||||
raise
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
import inspect
|
||||
import unittest
|
||||
from flask import Flask
|
||||
from datetime import timedelta
|
||||
@ -97,7 +96,7 @@ class CrossdomainTest(unittest.TestCase):
|
||||
|
||||
# when attach_to_all is False the decorator will not assign
|
||||
# the Access-Control-* headers to the response
|
||||
for header, value in response.headers:
|
||||
for header, _ in response.headers:
|
||||
self.assertFalse(header.startswith('Access-Control-'))
|
||||
|
||||
|
||||
|
@ -518,8 +518,8 @@ class ServerTestCase(unittest.TestCase):
|
||||
self.assertEqual(200, response.status_code)
|
||||
self.assertTrue(len(response.data) > 1024)
|
||||
# look for some well known strings inside the documentation
|
||||
self.assertRegexpMatches(response.data, "Lorax [\d.]+ documentation")
|
||||
self.assertRegexpMatches(response.data, "Copyright \d+, Red Hat, Inc.")
|
||||
self.assertRegexpMatches(response.data, r"Lorax [\d.]+ documentation")
|
||||
self.assertRegexpMatches(response.data, r"Copyright \d+, Red Hat, Inc.")
|
||||
|
||||
def test_api_docs(self):
|
||||
"""Test the /api/docs/"""
|
||||
|
@ -72,7 +72,7 @@ class WorkspaceTest(unittest.TestCase):
|
||||
# The recipe was written by the workspace_write test.
|
||||
with self.assertRaises(recipes.RecipeFileError):
|
||||
with mock.patch('pylorax.api.workspace.recipe_from_toml', side_effect=IOError('TESTING')):
|
||||
recipe = workspace_read(self.repo, "master", "http-server")
|
||||
workspace_read(self.repo, "master", "http-server")
|
||||
|
||||
def test_05_workspace_delete(self):
|
||||
"""Test the workspace_delete function"""
|
||||
|
Loading…
Reference in New Issue
Block a user