Skip to content

Commit

Permalink
Merge pull request #47 from Kosjenka-Reading-App/dev
Browse files Browse the repository at this point in the history
Merge tests removal
  • Loading branch information
vvihorev authored Jan 10, 2024
2 parents aed832b + b03125e commit b9eec19
Showing 1 changed file with 1 addition and 48 deletions.
49 changes: 1 addition & 48 deletions test/test_password.py
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(
Expand All @@ -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(
Expand Down

0 comments on commit b9eec19

Please sign in to comment.