mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Merge branch 'master' into reset-password
This commit is contained in:
@@ -2,10 +2,11 @@ import json
|
||||
import moto
|
||||
from datetime import (datetime, timedelta)
|
||||
from flask import url_for
|
||||
from app.models import (VerifyCode)
|
||||
from app.models import (VerifyCode, User)
|
||||
import app.celery.tasks
|
||||
from app import db, encryption
|
||||
from tests import create_authorization_header
|
||||
from freezegun import freeze_time
|
||||
|
||||
|
||||
def test_user_verify_code_sms(notify_api,
|
||||
@@ -127,6 +128,7 @@ def test_user_verify_code_email_expired_code(notify_api,
|
||||
assert not VerifyCode.query.first().code_used
|
||||
|
||||
|
||||
@freeze_time("2016-01-01 10:00:00.000000")
|
||||
def test_user_verify_password(notify_api,
|
||||
notify_db,
|
||||
notify_db_session,
|
||||
@@ -146,6 +148,7 @@ def test_user_verify_password(notify_api,
|
||||
data=data,
|
||||
headers=[('Content-Type', 'application/json'), auth_header])
|
||||
assert resp.status_code == 204
|
||||
User.query.get(sample_user.id).logged_in_at == datetime.utcnow()
|
||||
|
||||
|
||||
def test_user_verify_password_invalid_password(notify_api,
|
||||
|
||||
Reference in New Issue
Block a user