Example #1
0
def test_matching_emails_with_mismatched_emails():
    form = deform.Form(schemas.ProfileSchema())
    value = {
        "email": "foo",
        "emailAgain": "bar"
    }
    with pytest.raises(colander.Invalid):
        schemas.matching_emails(form, value)
Example #2
0
def test_matching_emails_with_matched_emails():
    form = deform.Form(schemas.ProfileSchema())
    value = {
        "email": "foo",
        "emailAgain": "foo"
    }
    assert schemas.matching_emails(form, value) is None
Example #3
0
def test_matching_emails_with_matched_emails():
    form = deform.Form(schemas.ProfileSchema())
    value = {"email": "foo", "emailAgain": "foo"}
    assert schemas.matching_emails(form, value) is None
Example #4
0
def test_matching_emails_with_mismatched_emails():
    form = deform.Form(schemas.ProfileSchema())
    value = {"email": "foo", "emailAgain": "bar"}
    with pytest.raises(colander.Invalid):
        schemas.matching_emails(form, value)