mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
a8e133105c
commit
1ed7a654ba
1 changed files with 8 additions and 0 deletions
8
test/units/plugins/cache/test_cache.py
vendored
8
test/units/plugins/cache/test_cache.py
vendored
|
@ -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 a new issue