From e26dd805eb2201e9ad0249ecce62dda5b754b616 Mon Sep 17 00:00:00 2001 From: vvihorev Date: Sat, 6 Jan 2024 18:56:55 +0100 Subject: [PATCH] remove reset request tests --- test/test_password.py | 49 +------------------------------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/test/test_password.py b/test/test_password.py index f5c546a..2db1270 100644 --- a/test/test_password.py +++ b/test/test_password.py @@ -1,45 +1,8 @@ -import pytest -from conftest import client, auth_header +from conftest import client from auth import createPasswortResetToken -def test_send_password_mail_superadmin(): - email = {"email": "superadmin@gmail.com"} - resp = client.post( - "http://localhost:8000/password/forgot", - json=email, - ) - assert resp.status_code == 200 - assert ( - "An email has been sent to superadmin@gmail.com with a link for password reset." - in resp.json()["result"] - ) - - -def test_send_password_mail_user(): - email = {"email": "regular@gmail.com"} - resp = client.post( - "http://localhost:8000/password/forgot", - json=email, - ) - assert resp.status_code == 200 - assert ( - "An email has been sent to regular@gmail.com with a link for password reset." - in resp.json()["result"] - ) - - def test_regular_account_reset_password(): - email = {"email": "regular@gmail.com"} - resp = client.post( - "http://localhost:8000/password/forgot", - json=email, - ) - assert resp.status_code == 200 - assert ( - "An email has been sent to regular@gmail.com with a link for password reset." - in resp.json()["result"] - ) reset_token = createPasswortResetToken("regular@gmail.com", 6000) new_password_payload = {"password": "new_password_regular", "token": reset_token} reset_password_response = client.post( @@ -66,16 +29,6 @@ def test_regular_account_reset_password(): def test_superadmin_account_reset_password(): - email = {"email": "update@gmail.com"} - resp = client.post( - "http://localhost:8000/password/forgot", - json=email, - ) - assert resp.status_code == 200 - assert ( - "An email has been sent to update@gmail.com with a link for password reset." - in resp.json()["result"] - ) reset_token = createPasswortResetToken("update@gmail.com", 6000) new_password_payload = {"password": "new_password_superadmin", "token": reset_token} reset_password_response = client.post(