def test_login_form_not_valid(customer_user): data = {'user': '******', 'password': '******'} form = LoginForm(data=data) assert not form.is_valid() assert form.get_user_id() is None
def test_login_form_valid(customer_user): data = {'username': '******', 'password': '******'} form = LoginForm(data=data) assert form.is_valid() assert form.get_user() == customer_user