Пример #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']
Пример #2
0
def test_signup_form_empty():
    form = SignupForm({})
    assert not form.is_valid()
Пример #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
Пример #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]
Пример #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]
Пример #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