mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #20460 from rallytime/pylint_15_PR_cleanup
Clean up some pylint on 2015.2
This commit is contained in:
commit
193a8138fd
@ -236,7 +236,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')
|
||||
|
@ -148,28 +148,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'])
|
||||
|
@ -135,10 +135,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