def test_invalid_mobile_number1():
    mobile = SignupForm({'mobile': '123$%78@0j'})
    mobile.is_valid()
    assert "Contact Number should only consist digits" in (
        mobile.errors['mobile'])
Exemplo n.º 2
0
def test_signup_form():
    signupform = SignupForm(auto_id=False)
    for field in signupform.fields.values():
        if (field.required):
            assert field.label.endswith("*")
def test_invalid_mobile_number2():
    mobile = SignupForm({'mobile': '12345'})
    mobile.is_valid()
    assert "Contact Number should be of 10 digits" in (mobile.errors['mobile'])