def test_login_form_should_validate_the_length_of_password(self): with app.test_request_context(): form = LoginForm(username="******", password="******") assert_false(form.validate())
def test_login_form_should_accept_valid_username_and_password(self): with app.test_request_context(): form = LoginForm(username="******", password="******") assert_true(form.validate())
def do_login(): form = LoginForm() if form.validate_on_submit(): pass # TODO: login return render_template("login.html", form=form)
def test_login_form_should_validate_presence_of_password(self): with app.test_request_context(): form = LoginForm(username="******", password=None) assert_false(form.validate())
def show_login_form(): form = LoginForm() return render_template("login.html", form=form)
def test_login_form_should_accept_valid_username_and_password(self): with app.test_request_context(): form = LoginForm(username='******', password='******') assert_true(form.validate())
def test_login_form_should_validate_the_length_of_password(self): with app.test_request_context(): form = LoginForm(username='******', password='******') assert_false(form.validate())
def test_login_form_should_validate_presence_of_password(self): with app.test_request_context(): form = LoginForm(username='******', password=None) assert_false(form.validate())