Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

src/p/o/portfoliyo-HEAD/portfoliyo/tests/landing/test_forms.py   portfoliyo(Download)
def test_required_error():
    """Friendly error message if no email given."""
    form = forms.LeadForm({"email": ""})
 
    assert not form.is_valid()
def test_invalid_error():
    """Friendly error message if invalid email given."""
    form = forms.LeadForm({"email": "foo"})
 
    assert not form.is_valid()