mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 14:29:25 -04:00
fix test
This commit is contained in:
@@ -257,7 +257,7 @@
|
|||||||
"filename": "tests/app/db.py",
|
"filename": "tests/app/db.py",
|
||||||
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
"hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8",
|
||||||
"is_verified": false,
|
"is_verified": false,
|
||||||
"line_number": 90,
|
"line_number": 91,
|
||||||
"is_secret": false
|
"is_secret": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -374,5 +374,5 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"generated_at": "2025-07-02T18:56:01Z"
|
"generated_at": "2025-08-12T18:08:49Z"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ def create_user(
|
|||||||
id_=None,
|
id_=None,
|
||||||
name="Test User",
|
name="Test User",
|
||||||
platform_admin=False,
|
platform_admin=False,
|
||||||
|
login_uuid=None,
|
||||||
):
|
):
|
||||||
data = {
|
data = {
|
||||||
"id": id_ or uuid.uuid4(),
|
"id": id_ or uuid.uuid4(),
|
||||||
@@ -91,6 +92,7 @@ def create_user(
|
|||||||
"mobile_number": mobile_number,
|
"mobile_number": mobile_number,
|
||||||
"state": state,
|
"state": state,
|
||||||
"platform_admin": platform_admin,
|
"platform_admin": platform_admin,
|
||||||
|
"login_uuid": login_uuid,
|
||||||
}
|
}
|
||||||
stmt = select(User).where(User.email_address == email)
|
stmt = select(User).where(User.email_address == email)
|
||||||
user = db.session.execute(stmt).scalars().first()
|
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):
|
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"}
|
data = {"email": "findel.mestro@foo.com", "login_uuid": "123456"}
|
||||||
|
|
||||||
users = admin_request.post(
|
users = admin_request.post(
|
||||||
@@ -1075,7 +1075,7 @@ def test_get_user_login_gov_user(notify_db_session, admin_request):
|
|||||||
_data=data,
|
_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):
|
def test_find_users_by_email_handles_no_results(notify_db_session, admin_request):
|
||||||
|
|||||||
Reference in New Issue
Block a user