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
示例#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
示例#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']
示例#6
0
def test_signup_form_empty():
    form = SignupForm({})
    assert not form.is_valid()
示例#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]
示例#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"]
示例#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