mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
nso_verify handle leaf-list in 4.5 and identityref (#37393)
NSO verify did not handle leaf-list value verification in 4.5 and later due to changes made for configuration writing made. map prefix for identityref types in verification.
This commit is contained in:
parent
1fd9a616a4
commit
6308047dc9
4 changed files with 51 additions and 26 deletions
|
@ -61,6 +61,10 @@ class MockResponse(object):
|
|||
|
||||
|
||||
def mock_call(calls, url, timeout, data=None, headers=None, method=None):
|
||||
if len(calls) == 0:
|
||||
raise ValueError('no call mock for method {0}({1})'.format(
|
||||
url, data))
|
||||
|
||||
result = calls[0]
|
||||
del calls[0]
|
||||
|
||||
|
@ -99,6 +103,8 @@ class TestNsoModule(unittest.TestCase):
|
|||
self.assertEqual(result['changed'], changed, result)
|
||||
|
||||
for key, value in kwargs.items():
|
||||
if key not in result:
|
||||
self.fail("{0} not in result {1}".format(key, result))
|
||||
self.assertEqual(value, result[key])
|
||||
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue