diff options
Diffstat (limited to 'tests/sources/git.py')
| -rw-r--r-- | tests/sources/git.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/sources/git.py b/tests/sources/git.py index e3f803469..69155e02b 100644 --- a/tests/sources/git.py +++ b/tests/sources/git.py @@ -760,7 +760,7 @@ def test_track_fetch(cli, tmpdir, datafiles, ref_format, tag, extra_commit): result.assert_success() element = _yaml.load(element_path) - new_ref = _yaml.node_get(element, dict, 'sources', [0]).get_str('ref') + new_ref = element.get_sequence('sources').mapping_at(0).get_str('ref') if ref_format == 'git-describe' and tag: # Check and strip prefix @@ -849,7 +849,7 @@ def test_git_describe(cli, tmpdir, datafiles, ref_storage, tag_type): if ref_storage == 'inline': element = _yaml.load(element_path) - tags = _yaml.node_get(_yaml.node_get(element, dict, 'sources', [0]), list, 'tags') + tags = element.get_sequence('sources').mapping_at(0).get_sequence('tags') assert len(tags) == 2 for tag in tags: assert 'tag' in tag @@ -962,11 +962,11 @@ def test_git_describe_head_is_tagged(cli, tmpdir, datafiles, ref_storage, tag_ty if ref_storage == 'inline': element = _yaml.load(element_path) - source = _yaml.node_get(element, dict, 'sources', indices=[0]) - tags = _yaml.node_get(source, list, 'tags') + source = element.get_sequence('sources').mapping_at(0) + tags = source.get_sequence('tags') assert len(tags) == 1 - tag = _yaml.node_get(source, dict, 'tags', indices=[0]) + tag = source.get_sequence('tags').mapping_at(0) assert 'tag' in tag assert 'commit' in tag assert 'annotated' in tag @@ -1125,7 +1125,7 @@ def test_default_do_not_track_tags(cli, tmpdir, datafiles): result.assert_success() element = _yaml.load(element_path) - source = _yaml.node_get(element, dict, 'sources', indices=[0]) + source = element.get_sequence('sources').mapping_at(0) assert 'tags' not in source |
