Beispiel #1
0
def test_required_tag_empty(tag):
    char = Changeling(type=['changeling'], **{tag: [' \t']})
    char.validate()
    assert "No values for tag '{}'".format(tag) in char.problems
Beispiel #2
0
def test_single_tags(key, values):
    char = Changeling(type=['changeling'], **{key: values})
    char.validate(strict=True)
    assert "Too many values for tag '{}'. Limit of 1".format(
        key) in char.problems
Beispiel #3
0
def test_required_tag_present(tag):
    char = Changeling(type=['changeling'], **{tag: ['hi']})
    char.validate()
    assert "No values for tag '{}'".format(tag) not in char.problems