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
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() assert form.errors["email"]
def test_signup_form_not_valid(): data = {"email": "admin@example", "password": "******"} form = SignupForm(data) assert not form.is_valid() assert "email" in form.errors