summaryrefslogtreecommitdiff
path: root/tests/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins')
-rw-r--r--tests/plugins/yamlrdr.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/plugins/yamlrdr.py b/tests/plugins/yamlrdr.py
index 2f2694b..e09bb21 100644
--- a/tests/plugins/yamlrdr.py
+++ b/tests/plugins/yamlrdr.py
@@ -99,7 +99,7 @@ root:
f.close()
- def testSimpleYamlContent(self):
+ def XXXtestSimpleYamlContent(self):
"""Validate Yaml content readers."""
def _build_node_desc(node, left, extra = ''):
@@ -158,7 +158,7 @@ root:
self.assertEqual('\n' + fulldesc + '\n', self._mixed_data.decode('ascii'))
- def testSimpleYamlContentFinder(self):
+ def XXXtestSimpleYamlContentFinder(self):
"""Validate Yaml nested content search."""
reader = YamlReader.new_from_path(self._nested.name)
@@ -236,6 +236,24 @@ root:
if len(found) == 1:
self.assertEqual(found[0].yaml_line.key, 'root')
+ found = reader.tree.find_by_path('/root/', True)
+
+ self.assertEqual(len(found), 1)
+
+ found = reader.tree.find_one_by_path('/root/', True)
+
+ self.assertIsNotNone(found)
+
+ if found:
+
+ sub = found.find_one_by_path('/a')
+ self.assertIsNotNone(sub)
+ self.assertEqual(sub.yaml_line.key, 'a')
+
+ sub = found.find_one_by_path('/aa')
+ self.assertIsNotNone(sub)
+ self.assertEqual(sub.yaml_line.key, 'aa')
+
found = reader.tree.find_by_path('/root/')
self.assertEqual(len(found), 2)