From bf15bcf1f151b2c519c6c66d8ae6665aa17c7658 Mon Sep 17 00:00:00 2001 From: imacat Date: Wed, 23 Nov 2022 23:23:38 +1100 Subject: [PATCH] Revised the request methods of the routes in the test cases. --- tests/test_auth.py | 4 ++-- tests/test_flask_login.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_auth.py b/tests/test_auth.py index 7b79f99..43b12f5 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -70,7 +70,7 @@ class AuthenticationTestCase(TestCase): }) app.test_client_class = Client - @app.route("/login-required-1/auth", endpoint="auth-1") + @app.get("/login-required-1/auth", endpoint="auth-1") @auth.login_required def login_required_1() -> str: """The first dummy view. @@ -79,7 +79,7 @@ class AuthenticationTestCase(TestCase): """ return f"Hello, {g.user.username}! #1" - @app.route("/login-required-2/auth", endpoint="auth-2") + @app.get("/login-required-2/auth", endpoint="auth-2") @auth.login_required def login_required_2() -> str: """The second dummy view. diff --git a/tests/test_flask_login.py b/tests/test_flask_login.py index 4262563..41566e4 100644 --- a/tests/test_flask_login.py +++ b/tests/test_flask_login.py @@ -91,7 +91,7 @@ class FlaskLoginTestCase(TestCase): """ return User(user_id) if user_id in user_db else None - @app.route("/login-required-1/auth", endpoint="auth-1") + @app.get("/login-required-1/auth", endpoint="auth-1") @flask_login.login_required def login_required_1() -> str: """The first dummy view. @@ -100,7 +100,7 @@ class FlaskLoginTestCase(TestCase): """ return f"Hello, {flask_login.current_user.username}! #1" - @app.route("/login-required-2/auth", endpoint="auth-2") + @app.get("/login-required-2/auth", endpoint="auth-2") @flask_login.login_required def login_required_2() -> str: """The second dummy view.