summaryrefslogtreecommitdiff
path: root/tests/yaml/yaml.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-10-01 19:06:21 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-10-01 19:17:13 +0900
commit2d664a9a47c55f5adb8f7d9694fc4198067411ea (patch)
treee05f1e6b5f06312f986a170b1f29d7502617c863 /tests/yaml/yaml.py
parent717ef5e35deda4637d0b74a62a3718b83e5471b1 (diff)
downloadbuildstream-2d664a9a47c55f5adb8f7d9694fc4198067411ea.tar.gz
_yaml.py: Fixing inconsistently named API _yaml.validate_node()
All of the _yaml APIs which deal with a node (dictionary loaded from YAML) are named _yaml.node_foo(), _yaml.node_bar(), _yaml.node_baz() etc, except for this one glaring exception. Also added a missing internal API documenting comment for _yaml.node_validate() Also updated all callers to _yaml.validate_node() to now call _yaml.node_validate().
Diffstat (limited to 'tests/yaml/yaml.py')
-rw-r--r--tests/yaml/yaml.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/yaml/yaml.py b/tests/yaml/yaml.py
index e972f89f4..948151bed 100644
--- a/tests/yaml/yaml.py
+++ b/tests/yaml/yaml.py
@@ -163,7 +163,7 @@ def test_composited_array_append_provenance(datafiles):
@pytest.mark.datafiles(os.path.join(DATA_DIR))
-def test_validate_node(datafiles):
+def test_node_validate(datafiles):
valid = os.path.join(datafiles.dirname,
datafiles.basename,
@@ -174,12 +174,12 @@ def test_validate_node(datafiles):
base = _yaml.load(valid)
- _yaml.validate_node(base, ['kind', 'description', 'moods', 'children', 'extra'])
+ _yaml.node_validate(base, ['kind', 'description', 'moods', 'children', 'extra'])
base = _yaml.load(invalid)
with pytest.raises(LoadError) as exc:
- _yaml.validate_node(base, ['kind', 'description', 'moods', 'children', 'extra'])
+ _yaml.node_validate(base, ['kind', 'description', 'moods', 'children', 'extra'])
assert (exc.value.reason == LoadErrorReason.INVALID_DATA)