Loading tests/functional/test_annotators.py +4 −4 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ def test_valid_annotator(test_client, init_database): GIVEN a Flask application WHEN an annotator uses a keyword on the '/user/signup' page (POST) which is never used from other annotators THEN check if: THEN check if it is redirected to the right route: 1. the response is valid -> annotator is redirected to the project homepage '/annotator/test' (GET) 2. it renders the right template Loading @@ -31,7 +31,7 @@ def test_valid_annotator(test_client, init_database): GIVEN a Flask application WHEN an annotator uses a keyword on the '/user/signup' page (POST) that he has already used and can type in his pseudoname (self defined) again THEN check if: THEN check if is redirected to the right route: 1. the response is valid -> annotator is redirected to the project homepage '/annotator/test' (GET) 2. it renders the right template Loading @@ -53,7 +53,7 @@ def test_invalid_keyword(test_client, init_database): """ GIVEN a Flask application WHEN an annotator types in a wrong keyword on the '/annotator' page (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> annotator stays at main page at '/annotator' (GET) 2. it renders the right template (template 'templates/annotator/index.html' has page title of 'Annotator - Main page' Loading @@ -74,7 +74,7 @@ def test_invalid_name(test_client, init_database): GIVEN a Flask application WHEN an annotator types in the right keyword but specifies the wrong name on the '/user/signup' page (POST) as this keyword is used from an another user THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (annotator stays on the main page) -> GET 2. it renders the right template (template 'templates/annotator/index.html' has page title of 'Annotator - Main page' Loading tests/functional/test_batches.py +6 −6 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ def test_batch(test_client, init_database): GIVEN a Flask application WHEN a logged-in annotator wants to start the annotation on a batch, e.g. '/annotator/test/batch-1' page is requested (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid -> it is redirected to the page of batch 1 2. it renders the right template (template 'templates/annotator/batch.html' has page title 'BATCH 1') Loading Loading @@ -36,7 +36,7 @@ def test_submit_invalid_batch(test_client, init_database): """ GIVEN a Flask application WHEN a logged in annotator submits an annotation of a tuple with the same answer for 'best' and 'worst' at e.g. '/annotator/test/batch-1' page (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (annotator is redirected to the project page) -> GET 2. it renders the right template (template 'templates/annotator/project.html' has page title of project name 'TEST' Loading Loading @@ -81,7 +81,7 @@ def test_submit_valid_batch(test_client, init_database): """ GIVEN a Flask application WHEN a logged in annotator submits a valid annotation on the e.g. '/annotator/test/batch-1' page (POST) THEN check if: THEN check if is redirected to the right route: 1. the response is valid (annotator is redirected to the project page) -> GET 2. it renders the right template (template 'templates/annotator/project.html' has page title of project name 'TEST' Loading @@ -102,12 +102,12 @@ def test_submit_valid_batch(test_client, init_database): assert b"Admin" in response.data assert b"Batch 1 successfully submitted!" in response.data def test_reupload_same_valid_batch(test_client, init_database): def test_resubmit_same_batch(test_client, init_database): """ GIVEN a Flask application WHEN a logged in annotator submits a valid annotation again for a submitted batch WHEN a logged in annotator submits an annotation again for a submitted batch (no matter if it is valid or not) at e.g. '/annotator/test/batch-1' page (POST) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid (annotator is redirected to the project page) -> GET 2. it renders the right template (template 'templates/annotator/project.html' has page title of project name 'TEST' Loading tests/functional/test_homepage.py +5 −5 Original line number Diff line number Diff line Loading @@ -6,9 +6,9 @@ def test_home_page(test_client): """ GIVEN a Flask application WHEN the '/' page is requested (GET) THEN 1. check the response is valid 2. check if it renders the right template THEN check if is redirected to the right route: 1. if the response is valid 2. if it renders the right template (template **templates/start.html** has page title 'Homepage') """ response = test_client.get('/') Loading @@ -20,7 +20,7 @@ def test_user_homepage(test_client): """ GIVEN a Flask application WHEN the '/user' page is requested (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid 2. it renders the right template (template 'templates/user/index.html' has page title 'User - Homepage') Loading @@ -39,7 +39,7 @@ def test_annotator_homepage(test_client): """ GIVEN a Flask application WHEN the '/annotator' page is requested (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid 2. it renders the right template (template 'templates/annotator/index.html' has page title 'Annotator - Main page') Loading tests/functional/test_projects.py +8 −8 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ def test_upload_project(test_client, init_database): """ GIVEN a Flask application WHEN the '/user/upload-project' page is requested (GET) from a logged-in user THEN check if: THEN check if it is redirected to the right route: 1. the response is valid 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -36,7 +36,7 @@ def test_upload_file_no_required_extensions(test_client, init_database): """ GIVEN a Flask application WHEN an logged-in user uploads only files on '/user/upload-project' that don't have the required extensions (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -61,7 +61,7 @@ def test_upload_empty_files(test_client, init_database): """ GIVEN a Flask application WHEN an logged-in user uploads only empty valid txt-files on '/user/upload-project' (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -86,7 +86,7 @@ def test_upload_few_items(test_client, init_database): """ GIVEN a Flask application WHEN an logged-in user uploads valid txt-files on '/user/upload-project' but all of items are fewer than 5 (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -112,7 +112,7 @@ def test_upload_same_best_worst_def(test_client, init_database): GIVEN a Flask application WHEN an logged-in user fills every required field on '/user/upload-project' but set the definition for best and worst are the same (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -138,7 +138,7 @@ def test_upload_short_description(test_client, init_database): GIVEN a Flask application WHEN an logged-in user uploads a project on '/user/upload-project' with a very short project description (fewer than 10 characters) (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -164,7 +164,7 @@ def test_upload_no_anno_number(test_client, init_database): GIVEN a Flask application WHEN an logged-in user uploads a project on '/user/upload-project' without providing number of expected annotators for the project (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -186,7 +186,7 @@ def test_upload_valid_project(test_client, init_database): """ GIVEN a Flask application WHEN an logged-in user uploads a valid project on '/user/upload-project' (POST) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid (user is redirected to the valid username page) -> GET 2. it renders the right template (template 'templates/user/profile.html' has page title of 'JUNG' as logged in username is 'jung') Loading tests/functional/test_users.py +10 −10 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ def test_user_signup(test_client): """ GIVEN a Flask application WHEN the '/user/signup' page is requested (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid 2. it renders the right template (template 'templates/user/signup.html' has page title 'SIGNUP') Loading @@ -30,7 +30,7 @@ def test_valid_signup(test_client, init_database): """ GIVEN a Flask application WHEN a new user signs up on the '/user/signup' page (POST) with a valid username and email THEN check if: THEN check if it is redirected to the right route: 1. the response is valid (user is redirected to the user homepage) -> GET 2. it renders the right template (template 'templates/user/index.html' has page title of 'User - Homepage' Loading @@ -51,7 +51,7 @@ def test_invalid_username_signup(test_client, init_database): """ GIVEN a Flask application WHEN a user wants to sign up on the '/user/signup' page (POST) with an existing username THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (GET) -> it stays at '/user/signup' 2. it renders the right template (template 'templates/user/signup.html' has page title 'SIGNUP') Loading Loading @@ -109,7 +109,7 @@ def test_invalid_email_signup(test_client, init_database): """ GIVEN a Flask application WHEN a user wants to sign up on the '/user/signup' page (POST) with an existing email THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (GET) -> it stays at '/user/signup' 2. it renders the right template (template 'templates/user/signup.html' has page title 'SIGNUP') Loading Loading @@ -148,7 +148,7 @@ def test_invalid_password_signup(test_client, init_database): """ GIVEN a Flask application WHEN a user wants to sign up on the '/user/signup' page (POST) with a password that does not meet the length requirement THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (GET) -> it stays at '/user/signup' 2. it renders the right template (template 'templates/user/signup.html' has page title 'SIGNUP') Loading @@ -168,7 +168,7 @@ def test_user_login(test_client): """ GIVEN a Flask application WHEN the '/user/login' page is requested (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid 2. it renders the right template (template 'templates/user/login.html' has page title 'LOGIN') Loading @@ -191,7 +191,7 @@ def test_valid_login_logout(test_client, init_database): """ GIVEN a Flask application WHEN a user logs in on the '/user/login' page (POST) with a valid username THEN check if: THEN check if it is redirected to the right route: 1. the response is valid (user is redirected to the valid username page) -> GET 2. it renders the right template (template 'templates/user/profile.html' has page title of 'JUNG' as logged in username is 'jung') Loading @@ -207,7 +207,7 @@ def test_valid_login_logout(test_client, init_database): """ GIVEN a Flask application WHEN a logged in user logs out (the '/user/logout' page is requested) (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid (user is redirected to the 'User - Homepage') -> GET 2. it renders the right template (template 'templates/user/index.html' has page title 'User - Homepage') Loading @@ -228,7 +228,7 @@ def test_invalid_username_login(test_client, init_database): """ GIVEN a Flask application WHEN a user logs in on the '/user/login' page (POST) with a username that is not registered THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (GET) -> it stays at '/user/login' 2. it renders the right template (template 'templates/user/login.html' has page title 'LOGIN') Loading @@ -248,7 +248,7 @@ def test_invalid_password_login(test_client, init_database): """ GIVEN a Flask application WHEN a user logs in on the '/user/login' page (POST) with an existing username but with wrong password THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (GET) -> it stays at '/user/login' 2. it renders the right template (template 'templates/user/login.html' has page title 'LOGIN') Loading Loading
tests/functional/test_annotators.py +4 −4 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ def test_valid_annotator(test_client, init_database): GIVEN a Flask application WHEN an annotator uses a keyword on the '/user/signup' page (POST) which is never used from other annotators THEN check if: THEN check if it is redirected to the right route: 1. the response is valid -> annotator is redirected to the project homepage '/annotator/test' (GET) 2. it renders the right template Loading @@ -31,7 +31,7 @@ def test_valid_annotator(test_client, init_database): GIVEN a Flask application WHEN an annotator uses a keyword on the '/user/signup' page (POST) that he has already used and can type in his pseudoname (self defined) again THEN check if: THEN check if is redirected to the right route: 1. the response is valid -> annotator is redirected to the project homepage '/annotator/test' (GET) 2. it renders the right template Loading @@ -53,7 +53,7 @@ def test_invalid_keyword(test_client, init_database): """ GIVEN a Flask application WHEN an annotator types in a wrong keyword on the '/annotator' page (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> annotator stays at main page at '/annotator' (GET) 2. it renders the right template (template 'templates/annotator/index.html' has page title of 'Annotator - Main page' Loading @@ -74,7 +74,7 @@ def test_invalid_name(test_client, init_database): GIVEN a Flask application WHEN an annotator types in the right keyword but specifies the wrong name on the '/user/signup' page (POST) as this keyword is used from an another user THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (annotator stays on the main page) -> GET 2. it renders the right template (template 'templates/annotator/index.html' has page title of 'Annotator - Main page' Loading
tests/functional/test_batches.py +6 −6 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ def test_batch(test_client, init_database): GIVEN a Flask application WHEN a logged-in annotator wants to start the annotation on a batch, e.g. '/annotator/test/batch-1' page is requested (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid -> it is redirected to the page of batch 1 2. it renders the right template (template 'templates/annotator/batch.html' has page title 'BATCH 1') Loading Loading @@ -36,7 +36,7 @@ def test_submit_invalid_batch(test_client, init_database): """ GIVEN a Flask application WHEN a logged in annotator submits an annotation of a tuple with the same answer for 'best' and 'worst' at e.g. '/annotator/test/batch-1' page (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (annotator is redirected to the project page) -> GET 2. it renders the right template (template 'templates/annotator/project.html' has page title of project name 'TEST' Loading Loading @@ -81,7 +81,7 @@ def test_submit_valid_batch(test_client, init_database): """ GIVEN a Flask application WHEN a logged in annotator submits a valid annotation on the e.g. '/annotator/test/batch-1' page (POST) THEN check if: THEN check if is redirected to the right route: 1. the response is valid (annotator is redirected to the project page) -> GET 2. it renders the right template (template 'templates/annotator/project.html' has page title of project name 'TEST' Loading @@ -102,12 +102,12 @@ def test_submit_valid_batch(test_client, init_database): assert b"Admin" in response.data assert b"Batch 1 successfully submitted!" in response.data def test_reupload_same_valid_batch(test_client, init_database): def test_resubmit_same_batch(test_client, init_database): """ GIVEN a Flask application WHEN a logged in annotator submits a valid annotation again for a submitted batch WHEN a logged in annotator submits an annotation again for a submitted batch (no matter if it is valid or not) at e.g. '/annotator/test/batch-1' page (POST) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid (annotator is redirected to the project page) -> GET 2. it renders the right template (template 'templates/annotator/project.html' has page title of project name 'TEST' Loading
tests/functional/test_homepage.py +5 −5 Original line number Diff line number Diff line Loading @@ -6,9 +6,9 @@ def test_home_page(test_client): """ GIVEN a Flask application WHEN the '/' page is requested (GET) THEN 1. check the response is valid 2. check if it renders the right template THEN check if is redirected to the right route: 1. if the response is valid 2. if it renders the right template (template **templates/start.html** has page title 'Homepage') """ response = test_client.get('/') Loading @@ -20,7 +20,7 @@ def test_user_homepage(test_client): """ GIVEN a Flask application WHEN the '/user' page is requested (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid 2. it renders the right template (template 'templates/user/index.html' has page title 'User - Homepage') Loading @@ -39,7 +39,7 @@ def test_annotator_homepage(test_client): """ GIVEN a Flask application WHEN the '/annotator' page is requested (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid 2. it renders the right template (template 'templates/annotator/index.html' has page title 'Annotator - Main page') Loading
tests/functional/test_projects.py +8 −8 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ def test_upload_project(test_client, init_database): """ GIVEN a Flask application WHEN the '/user/upload-project' page is requested (GET) from a logged-in user THEN check if: THEN check if it is redirected to the right route: 1. the response is valid 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -36,7 +36,7 @@ def test_upload_file_no_required_extensions(test_client, init_database): """ GIVEN a Flask application WHEN an logged-in user uploads only files on '/user/upload-project' that don't have the required extensions (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -61,7 +61,7 @@ def test_upload_empty_files(test_client, init_database): """ GIVEN a Flask application WHEN an logged-in user uploads only empty valid txt-files on '/user/upload-project' (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -86,7 +86,7 @@ def test_upload_few_items(test_client, init_database): """ GIVEN a Flask application WHEN an logged-in user uploads valid txt-files on '/user/upload-project' but all of items are fewer than 5 (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -112,7 +112,7 @@ def test_upload_same_best_worst_def(test_client, init_database): GIVEN a Flask application WHEN an logged-in user fills every required field on '/user/upload-project' but set the definition for best and worst are the same (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -138,7 +138,7 @@ def test_upload_short_description(test_client, init_database): GIVEN a Flask application WHEN an logged-in user uploads a project on '/user/upload-project' with a very short project description (fewer than 10 characters) (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -164,7 +164,7 @@ def test_upload_no_anno_number(test_client, init_database): GIVEN a Flask application WHEN an logged-in user uploads a project on '/user/upload-project' without providing number of expected annotators for the project (POST) THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid -> user stays at '/user/upload-project' (GET) 2. it renders the right template (template 'templates/user/upload-project.html' has page title 'UPLOAD PROJECT') Loading @@ -186,7 +186,7 @@ def test_upload_valid_project(test_client, init_database): """ GIVEN a Flask application WHEN an logged-in user uploads a valid project on '/user/upload-project' (POST) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid (user is redirected to the valid username page) -> GET 2. it renders the right template (template 'templates/user/profile.html' has page title of 'JUNG' as logged in username is 'jung') Loading
tests/functional/test_users.py +10 −10 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ def test_user_signup(test_client): """ GIVEN a Flask application WHEN the '/user/signup' page is requested (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid 2. it renders the right template (template 'templates/user/signup.html' has page title 'SIGNUP') Loading @@ -30,7 +30,7 @@ def test_valid_signup(test_client, init_database): """ GIVEN a Flask application WHEN a new user signs up on the '/user/signup' page (POST) with a valid username and email THEN check if: THEN check if it is redirected to the right route: 1. the response is valid (user is redirected to the user homepage) -> GET 2. it renders the right template (template 'templates/user/index.html' has page title of 'User - Homepage' Loading @@ -51,7 +51,7 @@ def test_invalid_username_signup(test_client, init_database): """ GIVEN a Flask application WHEN a user wants to sign up on the '/user/signup' page (POST) with an existing username THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (GET) -> it stays at '/user/signup' 2. it renders the right template (template 'templates/user/signup.html' has page title 'SIGNUP') Loading Loading @@ -109,7 +109,7 @@ def test_invalid_email_signup(test_client, init_database): """ GIVEN a Flask application WHEN a user wants to sign up on the '/user/signup' page (POST) with an existing email THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (GET) -> it stays at '/user/signup' 2. it renders the right template (template 'templates/user/signup.html' has page title 'SIGNUP') Loading Loading @@ -148,7 +148,7 @@ def test_invalid_password_signup(test_client, init_database): """ GIVEN a Flask application WHEN a user wants to sign up on the '/user/signup' page (POST) with a password that does not meet the length requirement THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (GET) -> it stays at '/user/signup' 2. it renders the right template (template 'templates/user/signup.html' has page title 'SIGNUP') Loading @@ -168,7 +168,7 @@ def test_user_login(test_client): """ GIVEN a Flask application WHEN the '/user/login' page is requested (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid 2. it renders the right template (template 'templates/user/login.html' has page title 'LOGIN') Loading @@ -191,7 +191,7 @@ def test_valid_login_logout(test_client, init_database): """ GIVEN a Flask application WHEN a user logs in on the '/user/login' page (POST) with a valid username THEN check if: THEN check if it is redirected to the right route: 1. the response is valid (user is redirected to the valid username page) -> GET 2. it renders the right template (template 'templates/user/profile.html' has page title of 'JUNG' as logged in username is 'jung') Loading @@ -207,7 +207,7 @@ def test_valid_login_logout(test_client, init_database): """ GIVEN a Flask application WHEN a logged in user logs out (the '/user/logout' page is requested) (GET) THEN check if: THEN check if it is redirected to the right route: 1. the response is valid (user is redirected to the 'User - Homepage') -> GET 2. it renders the right template (template 'templates/user/index.html' has page title 'User - Homepage') Loading @@ -228,7 +228,7 @@ def test_invalid_username_login(test_client, init_database): """ GIVEN a Flask application WHEN a user logs in on the '/user/login' page (POST) with a username that is not registered THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (GET) -> it stays at '/user/login' 2. it renders the right template (template 'templates/user/login.html' has page title 'LOGIN') Loading @@ -248,7 +248,7 @@ def test_invalid_password_login(test_client, init_database): """ GIVEN a Flask application WHEN a user logs in on the '/user/login' page (POST) with an existing username but with wrong password THEN check if: THEN check if it is not redirected to any other routes due to invalid inputs: 1. the response is valid (GET) -> it stays at '/user/login' 2. it renders the right template (template 'templates/user/login.html' has page title 'LOGIN') Loading