mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Fix remaining pylint errors on develop
This commit is contained in:
parent
ced4bfccf1
commit
02d3235cf2
@ -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__ = {}
|
||||
|
@ -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')
|
||||
|
@ -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'])
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user