Replaced the get_errors_view with the get_messages_view in the create_test_app function in testlib.py.

This commit is contained in:
依瑪貓 2023-05-22 00:03:13 +08:00
parent 3b030c577c
commit 9e4927ee0b

View File

@ -71,9 +71,9 @@ def create_test_app() -> Flask:
"""The test view to return the CSRF token.""" """The test view to return the CSRF token."""
return render_template_string("{{csrf_token()}}") return render_template_string("{{csrf_token()}}")
@app.get("/.errors") @app.get("/.messages")
def get_errors_view() -> str: def get_messages_view() -> str:
"""The test view to return the CSRF token.""" """The test view to return the flashed messages."""
return render_template_string("{{get_flashed_messages()|tojson}}") return render_template_string("{{get_flashed_messages()|tojson}}")
return app return app