Add cp.is_cached test

This commit is contained in:
Thomas S Hatch 2012-04-04 10:46:01 -06:00
parent 0402ca6194
commit 2178b0162b

View File

@ -151,3 +151,25 @@ class CPModuleTest(integration.ModuleCase):
if 'grail/scene33' in path:
found = True
self.assertTrue(found)
def test_is_cached(self):
'''
cp.is_cached
'''
self.run_function(
'cp.cache_file',
[
'salt://grail/scene33',
])
ret1 = self.run_function(
'cp.is_cached',
[
'salt://grail/scene33',
])
self.assertTrue(ret1)
ret2 = self.run_function(
'cp.is_cached',
[
'salt://fasldkgj/poicxzbn',
])
self.assertFalse(ret2)