Implement OTP verification
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
from pytest import mark
|
||||
from pytest import mark, fixture
|
||||
from secrets import token_hex
|
||||
|
||||
from app.schemas import *
|
||||
from database.models import *
|
||||
from tests import client
|
||||
from tests.queries_test import get_test_db
|
||||
|
||||
|
||||
def test_registration():
|
||||
@@ -33,3 +35,13 @@ def test_login():
|
||||
}
|
||||
response = client.post("/login", json=user)
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
def test_otp_verification(get_test_db):
|
||||
user = get_test_db.query(Users).filter(Users.email == "oyvey@hotmail.com").first()
|
||||
data = {
|
||||
"access_key": user.access_key,
|
||||
"otp": user.otp,
|
||||
}
|
||||
response = client.post("/otpVerification", json=data)
|
||||
assert response.status_code == 200
|
||||
|
||||
Reference in New Issue
Block a user