diff options
Diffstat (limited to 'src/buildstream/testing/_sourcetests/mirror.py')
-rw-r--r-- | src/buildstream/testing/_sourcetests/mirror.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildstream/testing/_sourcetests/mirror.py b/src/buildstream/testing/_sourcetests/mirror.py index d682bb2ef..afbadbef7 100644 --- a/src/buildstream/testing/_sourcetests/mirror.py +++ b/src/buildstream/testing/_sourcetests/mirror.py @@ -357,9 +357,9 @@ def test_mirror_track_upstream_present(cli, tmpdir, datafiles, kind): # Tracking tries upstream first. Check the ref is from upstream. new_element = _yaml.load(element_path) - source = _yaml.node_get(new_element, dict, 'sources', [0]) + source = new_element.get_sequence('sources').mapping_at(0) if 'ref' in source: - assert _yaml.node_get(source, str, 'ref') == upstream_ref + assert source.get_str('ref') == upstream_ref @pytest.mark.datafiles(DATA_DIR) @@ -422,6 +422,6 @@ def test_mirror_track_upstream_absent(cli, tmpdir, datafiles, kind): # Check that tracking fell back to the mirror new_element = _yaml.load(element_path) - source = _yaml.node_get(new_element, dict, 'sources', [0]) + source = new_element.get_sequence('sources').mapping_at(0) if 'ref' in source: - assert _yaml.node_get(source, str, 'ref') == mirror_ref + assert source.get_str('ref') == mirror_ref |