diff options
Diffstat (limited to 'src/tests/test_dict_search.py')
-rw-r--r-- | src/tests/test_dict_search.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tests/test_dict_search.py b/src/tests/test_dict_search.py index 2435d89..216fa8a 100644 --- a/src/tests/test_dict_search.py +++ b/src/tests/test_dict_search.py @@ -20,6 +20,7 @@ from vyos.utils.dict import dict_search_recursive data = { 'string': 'fooo', + 'nested': {'string': 'bar', 'empty': '', 'list': ['foo', 'bar']}, 'non': {}, 'list': ['bar', 'baz'], @@ -27,13 +28,13 @@ data = { 'interfaces': {'dummy': {'dum0': {'address': ['192.0.2.17/29']}}, 'ethernet': {'eth0': {'address': ['2001:db8::1/64', '192.0.2.1/29'], 'description': 'Test123', - 'duplex': 'auto', + 'duplex': 'auto', 'hw_id': '00:00:00:00:00:01', 'speed': 'auto'}, 'eth1': {'address': ['192.0.2.9/29'], 'description': 'Test456', 'duplex': 'auto', - 'hw_id': '00:00:00:00:00:02', + 'hw_id': '00:00:00:00:00:02', 'speed': 'auto'}}} } @@ -43,12 +44,12 @@ class TestDictSearch(TestCase): def test_non_existing_keys(self): # TestDictSearch: Return False when querying for non-existent key - self.assertEqual(dict_search('non_existing', data), None) - self.assertEqual(dict_search('non.existing.fancy.key', data), None) + self.assertEqual(dict_search('non_existing', data), None) + self.assertEqual(dict_search('non.existing.fancy.key', data), None) def test_string(self): # TestDictSearch: Return value when querying string - self.assertEqual(dict_search('string', data), data['string']) + self.assertEqual(dict_search('string', data), data['string']) def test_list(self): # TestDictSearch: Return list items when querying list |