mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-19 14:04:20 -04:00
fix test
This commit is contained in:
@@ -82,6 +82,7 @@ def create_user(
|
||||
id_=None,
|
||||
name="Test User",
|
||||
platform_admin=False,
|
||||
login_uuid=None,
|
||||
):
|
||||
data = {
|
||||
"id": id_ or uuid.uuid4(),
|
||||
@@ -91,6 +92,7 @@ def create_user(
|
||||
"mobile_number": mobile_number,
|
||||
"state": state,
|
||||
"platform_admin": platform_admin,
|
||||
"login_uuid": login_uuid,
|
||||
}
|
||||
stmt = select(User).where(User.email_address == email)
|
||||
user = db.session.execute(stmt).scalars().first()
|
||||
|
||||
@@ -1067,7 +1067,7 @@ def test_find_users_by_email_finds_user_by_full_email(notify_db_session, admin_r
|
||||
|
||||
|
||||
def test_get_user_login_gov_user(notify_db_session, admin_request):
|
||||
create_user(email="findel.mestro@foo.com")
|
||||
create_user(email="findel.mestro@foo.com", login_uuid="123456")
|
||||
data = {"email": "findel.mestro@foo.com", "login_uuid": "123456"}
|
||||
|
||||
users = admin_request.post(
|
||||
@@ -1075,7 +1075,7 @@ def test_get_user_login_gov_user(notify_db_session, admin_request):
|
||||
_data=data,
|
||||
)
|
||||
|
||||
assert users["data"]["email_address"] == "findel.mestro@foo.com"
|
||||
assert users["data"]["login_uuid"] == "123456"
|
||||
|
||||
|
||||
def test_find_users_by_email_handles_no_results(notify_db_session, admin_request):
|
||||
|
||||
Reference in New Issue
Block a user