mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Lint
This commit is contained in:
parent
3e848ad126
commit
610a198322
@ -51,10 +51,11 @@ class CacheDictTestCase(TestCase):
|
||||
# make sure that a get would get a regular old key error
|
||||
self.assertRaises(KeyError, cd.__getitem__, 'foo')
|
||||
|
||||
|
||||
class CacheContextTestCase(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
context_dir = os.path.join(tempfile.gettempdir(), 'context')
|
||||
context_dir = os.path.join(tempfile.gettempdir(), 'context')
|
||||
if os.path.exists(context_dir):
|
||||
shutil.rmtree(os.path.join(tempfile.gettempdir(), 'context'))
|
||||
|
||||
@ -63,7 +64,7 @@ class CacheContextTestCase(TestCase):
|
||||
Smoke test the context cache
|
||||
'''
|
||||
if os.path.exists(os.path.join(tempfile.gettempdir(), 'context')):
|
||||
self.skipTest('Context dir already exists')
|
||||
self.skipTest('Context dir already exists')
|
||||
else:
|
||||
opts = salt.config.DEFAULT_MINION_OPTS
|
||||
opts['cachedir'] = tempfile.gettempdir()
|
||||
@ -75,7 +76,6 @@ class CacheContextTestCase(TestCase):
|
||||
|
||||
self.assertDictEqual({'a': 'b'}, ret)
|
||||
|
||||
|
||||
def test_context_wrapper(self):
|
||||
'''
|
||||
Test to ensure that a module which decorates itself
|
||||
@ -97,7 +97,6 @@ class CacheContextTestCase(TestCase):
|
||||
self.assertEqual(cache_test_func()['called'], 1)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from integration import run_tests
|
||||
run_tests(CacheDictTestCase, needs_daemon=False)
|
||||
|
Loading…
Reference in New Issue
Block a user