Esempio n. 1
0
def test_yaml_read_invalid(monkeypatch):
    yaml = load_raw_fixture("util_invalid.yaml")

    monkeypatch.setattr("__builtin__.open", fake_open(yaml, "/tmp/yaml", "r"))
    
    with raises(error.ValidatorError):
        util.yaml_read("/tmp/yaml")
Esempio n. 2
0
def test_yaml_read(monkeypatch, data):
    yaml = load_raw_fixture("util.yaml")
    monkeypatch.setattr("__builtin__.open", fake_open(yaml, "/tmp/yaml", "r"))

    result = util.yaml_read("/tmp/yaml")
    
    assert(result["multiple"]["network"] == "default")