summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-11-17 19:10:25 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-11-17 19:10:25 (GMT)
commitcef46f9f06a7448db60116e8c0ccadee44d83692 (patch)
tree75201f66b26499ad1968d6e1cec88f18ad80b72b /tests
parentc02661b7a8151a49a77c39241b040aa9bdb30223 (diff)
Extended the API to find an unique Yaml node.
Diffstat (limited to 'tests')
-rw-r--r--tests/plugins/yamlrdr.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/plugins/yamlrdr.py b/tests/plugins/yamlrdr.py
index eeae032..2f2694b 100644
--- a/tests/plugins/yamlrdr.py
+++ b/tests/plugins/yamlrdr.py
@@ -242,10 +242,10 @@ root:
if len(found) == 2:
- sub = found[0].find_by_path('/a')
- self.assertEqual(len(sub), 1)
- self.assertEqual(sub[0].yaml_line.key, 'a')
+ sub = found[0].find_one_by_path('/a')
+ self.assertIsNotNone(sub)
+ self.assertEqual(sub.yaml_line.key, 'a')
- sub = found[0].find_by_path('/aa')
- self.assertEqual(len(sub), 1)
- self.assertEqual(sub[0].yaml_line.key, 'aa')
+ sub = found[0].find_one_by_path('/aa')
+ self.assertIsNotNone(sub)
+ self.assertEqual(sub.yaml_line.key, 'aa')