parent
a8e133105c
commit
1ed7a654ba
|
@ -117,6 +117,14 @@ class TestFactCache(unittest.TestCase):
|
|||
"Unable to load the facts cache plugin.*json.*",
|
||||
FactCache)
|
||||
|
||||
def test_update(self):
|
||||
self.cache.update({'cache_key': {'key2': 'updatedvalue'}})
|
||||
assert self.cache['cache_key']['key2'] == 'updatedvalue'
|
||||
|
||||
def test_update_legacy(self):
|
||||
self.cache.update('cache_key', {'key2': 'updatedvalue'})
|
||||
assert self.cache['cache_key']['key2'] == 'updatedvalue'
|
||||
|
||||
def test_update_legacy_key_exists(self):
|
||||
self.cache['cache_key'] = {'key': 'value', 'key2': 'value2'}
|
||||
self.cache.update('cache_key', {'key': 'updatedvalue'})
|
||||
|
|
Loading…
Reference in New Issue