Esempio n. 1
0
def test_schemas(md, expected):
    if expected is SAME:
        expected = dict(md)

    if inspect.isclass(expected):
        with pytest.raises(expected):
            validate_metadata(md)
    else:
        assert validate_metadata(md) == expected
Esempio n. 2
0
def test_no_variety():
    with pytest.raises(ValueError):
        validate_metadata({'test': 'a'})
Esempio n. 3
0
def test_empty_md():
    validate_metadata({})