unittest.TestCase does not have a skip() method. It's skipTest.

This commit is contained in:
Pedro Algarvio 2017-04-13 00:37:09 +01:00
parent 790b500de7
commit 75569c8e99
No known key found for this signature in database
GPG Key ID: BB36BF6584A298FF
2 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ class GitFSTest(TestCase, LoaderModuleMockMixin):
Instead, we'll create a temporary repo on the fly for the tests to examine.
'''
if not gitfs.__virtual__():
self.skip("GitFS could not be loaded. Skipping GitFS tests!")
self.skipTest("GitFS could not be loaded. Skipping GitFS tests!")
self.integration_base_files = os.path.join(FILES, 'file', 'base')
# Create the dir if it doesn't already exist

View File

@ -69,7 +69,7 @@ class LocalClientTestCase(TestCase,
def test_pub(self):
if self.get_config('minion')['transport'] != 'zeromq':
self.skip('This test only works with ZeroMQ')
self.skipTest('This test only works with ZeroMQ')
# Make sure we cleanly return if the publisher isn't running
with patch('os.path.exists', return_value=False):
self.assertRaises(SaltClientError, lambda: self.client.pub('*', 'test.ping'))