-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from Kosjenka-Reading-App/dev
Merge tests removal
- Loading branch information
Showing
1 changed file
with
1 addition
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": "[email protected]"} | ||
resp = client.post( | ||
"http://localhost:8000/password/forgot", | ||
json=email, | ||
) | ||
assert resp.status_code == 200 | ||
assert ( | ||
"An email has been sent to [email protected] with a link for password reset." | ||
in resp.json()["result"] | ||
) | ||
|
||
|
||
def test_send_password_mail_user(): | ||
email = {"email": "[email protected]"} | ||
resp = client.post( | ||
"http://localhost:8000/password/forgot", | ||
json=email, | ||
) | ||
assert resp.status_code == 200 | ||
assert ( | ||
"An email has been sent to [email protected] with a link for password reset." | ||
in resp.json()["result"] | ||
) | ||
|
||
|
||
def test_regular_account_reset_password(): | ||
email = {"email": "[email protected]"} | ||
resp = client.post( | ||
"http://localhost:8000/password/forgot", | ||
json=email, | ||
) | ||
assert resp.status_code == 200 | ||
assert ( | ||
"An email has been sent to [email protected] with a link for password reset." | ||
in resp.json()["result"] | ||
) | ||
reset_token = createPasswortResetToken("[email protected]", 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": "[email protected]"} | ||
resp = client.post( | ||
"http://localhost:8000/password/forgot", | ||
json=email, | ||
) | ||
assert resp.status_code == 200 | ||
assert ( | ||
"An email has been sent to [email protected] with a link for password reset." | ||
in resp.json()["result"] | ||
) | ||
reset_token = createPasswortResetToken("[email protected]", 6000) | ||
new_password_payload = {"password": "new_password_superadmin", "token": reset_token} | ||
reset_password_response = client.post( | ||
|