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:
Claes Nästén 2018-03-20 11:01:36 +01:00 committed by John R Barker
commit 6308047dc9
4 changed files with 51 additions and 26 deletions

View file

@ -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