summaryrefslogtreecommitdiff
path: root/tests/format/options.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/format/options.py')
-rw-r--r--tests/format/options.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/format/options.py b/tests/format/options.py
index 3a8210dc3..e902b8b86 100644
--- a/tests/format/options.py
+++ b/tests/format/options.py
@@ -136,7 +136,7 @@ def test_simple_conditional(cli, datafiles, opt_option, expected_prefix):
'element.bst'])
result.assert_success()
loaded = _yaml.load_data(result.output)
- assert _yaml.node_get(loaded, str, 'prefix') == expected_prefix
+ assert loaded.get_str('prefix') == expected_prefix
@pytest.mark.datafiles(DATA_DIR)
@@ -159,7 +159,7 @@ def test_nested_conditional(cli, datafiles, debug, logging, expected):
'element.bst'])
result.assert_success()
loaded = _yaml.load_data(result.output)
- assert _yaml.node_get(loaded, str, 'debug') == expected
+ assert loaded.get_str('debug') == expected
@pytest.mark.datafiles(DATA_DIR)
@@ -182,7 +182,7 @@ def test_compound_and_conditional(cli, datafiles, debug, logging, expected):
'element.bst'])
result.assert_success()
loaded = _yaml.load_data(result.output)
- assert _yaml.node_get(loaded, str, 'debug') == expected
+ assert loaded.get_str('debug') == expected
@pytest.mark.datafiles(DATA_DIR)
@@ -205,7 +205,7 @@ def test_compound_or_conditional(cli, datafiles, debug, logging, expected):
'element.bst'])
result.assert_success()
loaded = _yaml.load_data(result.output)
- assert _yaml.node_get(loaded, str, 'logging') == expected
+ assert loaded.get_str('logging') == expected
@pytest.mark.datafiles(DATA_DIR)
@@ -226,7 +226,7 @@ def test_deep_nesting_level1(cli, datafiles, option, expected):
shallow_list = _yaml.node_get(loaded, list, 'shallow-nest')
first_dict = shallow_list[0]
- assert _yaml.node_get(first_dict, str, 'animal') == expected
+ assert first_dict.get_str('animal') == expected
@pytest.mark.datafiles(DATA_DIR)
@@ -248,4 +248,4 @@ def test_deep_nesting_level2(cli, datafiles, option, expected):
deeper_list = shallow_list[0]
first_dict = deeper_list[0]
- assert _yaml.node_get(first_dict, str, 'animal') == expected
+ assert first_dict.get_str('animal') == expected