mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
fix tests
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import json
|
||||
from datetime import datetime
|
||||
|
||||
from flask import Blueprint, current_app, jsonify, request
|
||||
from itsdangerous import BadData, SignatureExpired
|
||||
from notifications_utils.url_safe_token import check_token, generate_token
|
||||
|
||||
from app import redis_store
|
||||
from app.config import QueueNames
|
||||
from app.dao.invited_user_dao import (
|
||||
get_expired_invite_by_service_and_id,
|
||||
@@ -38,6 +40,7 @@ def _create_service_invite(invited_user, invite_link_host):
|
||||
"service_name": invited_user.service.name,
|
||||
"url": invited_user_url(invited_user.id, invite_link_host),
|
||||
}
|
||||
|
||||
saved_notification = persist_notification(
|
||||
template_id=template.id,
|
||||
template_version=template.version,
|
||||
@@ -50,6 +53,11 @@ def _create_service_invite(invited_user, invite_link_host):
|
||||
reply_to_text=invited_user.from_user.email_address,
|
||||
)
|
||||
saved_notification.personalisation = personalisation
|
||||
redis_store.set(
|
||||
f"email-personalisation-{saved_notification.id}",
|
||||
json.dumps(personalisation),
|
||||
ex=1800,
|
||||
)
|
||||
send_notification_to_queue(saved_notification, queue=QueueNames.NOTIFY)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user