summaryrefslogtreecommitdiff
path: root/tests/sources
diff options
context:
space:
mode:
authorBenjamin Schubert <contact@benschubert.me>2019-06-09 14:22:35 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-07-15 14:14:02 +0000
commitfcef3658433f74a2f396ed353bb3534f0001f3d8 (patch)
treea3c74347254332f06583fbdc1c6a6fc4411d21aa /tests/sources
parentf6616bc9d51a791aba1e177c61e27f768bebd9cb (diff)
downloadbuildstream-fcef3658433f74a2f396ed353bb3534f0001f3d8.tar.gz
_yaml: add 'get_mapping()' to MappingNode
This allows to get a mapping node from another 'MappingNode', replacing 'node_get(my_mapping, key, type=dict)' Also changes all places where 'node_get' was called like that by the new API.
Diffstat (limited to 'tests/sources')
-rw-r--r--tests/sources/previous_source_access.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/sources/previous_source_access.py b/tests/sources/previous_source_access.py
index 800e0ced5..50bfe383c 100644
--- a/tests/sources/previous_source_access.py
+++ b/tests/sources/previous_source_access.py
@@ -24,7 +24,7 @@ def test_custom_transform_source(cli, datafiles):
# Set the project_dir alias in project.conf to the path to the tested project
project_config_path = os.path.join(project, "project.conf")
project_config = _yaml.load(project_config_path)
- aliases = _yaml.node_get(project_config, dict, "aliases")
+ aliases = project_config.get_mapping("aliases")
_yaml.node_set(aliases, "project_dir", "file://{}".format(project))
_yaml.dump(project_config, project_config_path)