예제 #1
0
def test__load_yaml_success(loader):
    res = loader._load_yaml('---\ntest: string')
    assert isinstance(res, dict)
    assert res['test'] == 'string'

    res = loader._load_yaml('{"test": "string"}')
    assert isinstance(res, dict)
    assert res['test'] == 'string'
예제 #2
0
def test__load_yaml_failure(loader):
    res = loader._load_yaml('---\ntest: string:')
    assert res is None