def test_signup_form_user_exists(customer_user):
    data = {'email': customer_user.email, 'password': '******'}
    form = SignupForm(data)
    assert not form.is_valid()
    assert form.errors['email']
def test_signup_form_empty():
    form = SignupForm({})
    assert not form.is_valid()
def test_signup_form_not_valid():
    data = {'email': 'admin@example', 'password': '******'}
    form = SignupForm(data)
    assert not form.is_valid()
    assert 'email' in form.errors
Example #4
0
def test_signup_form_not_valid():
    data = {'email': 'admin@example', 'password': '******'}
    form = SignupForm(data)
    assert not form.is_valid()
    assert 'email' in form.errors
Example #5
0
def test_signup_form_user_exists(customer_user):
    data = {'email': customer_user.email, 'password': '******'}
    form = SignupForm(data)
    assert not form.is_valid()
    assert form.errors['email']
Example #6
0
def test_signup_form_empty():
    form = SignupForm({})
    assert not form.is_valid()
Example #7
0
def test_signup_form_user_exists(customer_user):
    data = {'email': customer_user.email, 'password': '******'}
    form = SignupForm(data)
    assert not form.is_valid()
    error_message = 'User with this Email already exists.'
    assert form.errors['email'] == [error_message]
def test_signup_form_user_exists(customer_user):
    data = {'email': customer_user.email, 'password': '******'}
    form = SignupForm(data)
    assert not form.is_valid()
    error_message = 'User with this Email already exists.'
    assert form.errors['email'] == [error_message]
Example #9
0
def test_signup_form_user_exists(customer_user):
    data = {"email": customer_user.email, "password": "******"}
    form = SignupForm(data)
    assert not form.is_valid()
    assert form.errors["email"]
Example #10
0
def test_signup_form_not_valid():
    data = {"email": "admin@example", "password": "******"}
    form = SignupForm(data)
    assert not form.is_valid()
    assert "email" in form.errors