mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Cleanup combine_vars
* Dedupe combine_vars() code (removed from VariableManager) * Fix merge_hash algorithm to preserve the type * unittest combine_vars and merge_hash
This commit is contained in:
@@ -48,20 +48,6 @@ class TestVariableManager(unittest.TestCase):
|
||||
|
||||
self.assertEqual(vars, dict(playbook_dir='.'))
|
||||
|
||||
self.assertEqual(
|
||||
v._merge_dicts(
|
||||
dict(a=1),
|
||||
dict(b=2)
|
||||
), dict(a=1, b=2)
|
||||
)
|
||||
self.assertEqual(
|
||||
v._merge_dicts(
|
||||
dict(a=1, c=dict(foo='bar')),
|
||||
dict(b=2, c=dict(baz='bam'))
|
||||
), dict(a=1, b=2, c=dict(foo='bar', baz='bam'))
|
||||
)
|
||||
|
||||
|
||||
def test_variable_manager_extra_vars(self):
|
||||
fake_loader = DictDataLoader({})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user