Fix remaining pylint errors on develop

This commit is contained in:
rallytime 2015-02-04 21:11:17 -07:00
parent ced4bfccf1
commit 02d3235cf2
4 changed files with 21 additions and 20 deletions

View File

@ -20,8 +20,7 @@ ensure_in_syspath('../../')
# Import Salt Libs
from salt.modules import match
import __builtin__
import salt.ext.six.moves.builtins as __builtin__
# Globals
match.__grains__ = {}

View File

@ -239,7 +239,7 @@ class MySQLTestCase(TestCase):
@skipIf(True, 'MySQL module claims this function is not ready for production')
def test_free_slave(self):
self.assertTrue(False)
pass
def test_query(self):
self._test_call(mysql.query, 'SELECT * FROM testdb', 'testdb', 'SELECT * FROM testdb')

View File

@ -151,28 +151,28 @@ class BuildoutTestCase(Base):
#self.assertEqual(ret1['status'], True)
#self.assertEqual(ret1['logs_by_level']['warn'], ['wbar'])
#self.assertEqual(ret1['comment'], '')
self.assertTrue(
u''
u'OUTPUT:\n'
u'foo\n'
u''
# These lines are throwing pylint errors - disabling for now since we are skipping
# these tests
# These lines are throwing pylint errors - disabling for now since we are skipping
# these tests
#self.assertTrue(
# u''
# u'OUTPUT:\n'
# u'foo\n'
# u''
#in ret1['outlog']
)
#)
# These lines are throwing pylint errors - disabling for now since we are skipping
# these tests
#self.assertTrue(u'Log summary:\n' in ret1['outlog'])
self.assertTrue(
u'INFO: ibar\n'
u'WARN: wbar\n'
u'DEBUG: dbar\n'
u'ERROR: ebar\n'
# These lines are throwing pylint errors - disabling for now since we are skipping
# these tests
# These lines are throwing pylint errors - disabling for now since we are skipping
# these tests
# self.assertTrue(
# u'INFO: ibar\n'
# u'WARN: wbar\n'
# u'DEBUG: dbar\n'
# u'ERROR: ebar\n'
#in ret1['outlog']
)
#)
# These lines are throwing pylint errors - disabling for now since we are skipping
# these tests
#self.assertTrue('by level' in ret1['outlog_by_level'])

View File

@ -139,10 +139,12 @@ class UtilsTestCase(TestCase):
@skipIf(os.path.exists('/tmp/no_way_this_is_a_file_nope.sh'), 'Test file exists! Skipping safe_rm_exceptions test!')
def test_safe_rm_exceptions(self):
error = False
try:
utils.safe_rm('/tmp/no_way_this_is_a_file_nope.sh')
except (IOError, OSError):
self.assertTrue(False, "utils.safe_rm raised exception when it should not have")
error = True
self.assertFalse(error, 'utils.safe_rm raised exception when it should not have')
@skipIf(NO_MOCK, NO_MOCK_REASON)
@patch('salt.utils.arg_lookup')