Exemplo n.º 1
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']
Exemplo n.º 2
0
def test_signup_form_empty():
    form = SignupForm({})
    assert not form.is_valid()
Exemplo n.º 3
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
Exemplo n.º 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
Exemplo n.º 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']
Exemplo n.º 6
0
def test_signup_form_empty():
    form = SignupForm({})
    assert not form.is_valid()
Exemplo n.º 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]
Exemplo n.º 8
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]
Exemplo n.º 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"]
Exemplo n.º 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