def test_func3():
    try:
        sav.validates(User, id=3, c1=6)
    except sav.ValidationError as e:
        assert isinstance(e[("c1",)], sav.OverMaxError)
def test_func2():
    assert isinstance(sav.validates(User, id=3, c1=3), User)
def test_func1():
    with pytest.raises(sav.ValidationError):
        sav.validates(User, id=3, c1=6)
Пример #4
0
def test_func3():
    try:
        sav.validates(User, id=3, c1=6)
    except sav.ValidationError as e:
        assert isinstance(e[("c1", )], sav.OverMaxError)
Пример #5
0
def test_func2():
    assert isinstance(sav.validates(User, id=3, c1=3), User)
Пример #6
0
def test_func1():
    with pytest.raises(sav.ValidationError):
        sav.validates(User, id=3, c1=6)