Did stuff, fixed things. This seems to work now.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2023-12-15 13:14:53 -05:00
parent b72ae4374f
commit 61d294292b
2 changed files with 8 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ def _create_service_invite(invited_user, invite_link_host):
template_id = current_app.config["INVITATION_EMAIL_TEMPLATE_ID"]
template = dao_get_template_by_id(template_id)
service = Service.query.get(current_app.config["NOTIFY_SERVICE_ID"])
saved_notification = persist_notification(
@@ -116,6 +117,7 @@ def resend_service_invite(service_id, invited_user_id):
current_data = {k: v for k, v in invited_user_schema.dump(fetched).items()}
update_dict = invited_user_schema.load(current_data)
save_invited_user(update_dict)
_create_service_invite(fetched, current_app.config["ADMIN_BASE_URL"])

View File

@@ -203,7 +203,12 @@ def test_get_invited_user_by_service_when_user_does_not_belong_to_the_service(
assert json_resp["result"] == "error"
def test_resend_expired_invite(client, sample_expired_user, mocker):
def test_resend_expired_invite(
client,
sample_expired_user,
invitation_email_template,
mocker,
):
url = f"/service/{sample_expired_user.service_id}/invite/{sample_expired_user.id}/resend"
mock_send = mocker.patch("app.service_invite.rest.send_notification_to_queue")
mock_persist = mocker.patch("app.service_invite.rest.persist_notification")