-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix broken go live email notification
- Loading branch information
Kenneth Kehl
committed
Nov 27, 2024
1 parent
a1155df
commit a5b83f5
Showing
2 changed files
with
1 addition
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,10 @@ | |
from sqlalchemy import func, select | ||
|
||
from app import db | ||
from app.dao.services_dao import ( | ||
dao_add_user_to_service, | ||
dao_fetch_active_users_for_service, | ||
) | ||
from app.dao.services_dao import dao_add_user_to_service | ||
from app.enums import NotificationType, TemplateType | ||
from app.models import Notification | ||
from app.service.sender import send_notification_to_service_users | ||
from app.utils import hilite | ||
from tests.app.db import create_service, create_template, create_user | ||
|
||
|
||
|
@@ -93,15 +89,10 @@ def test_send_notification_to_service_users_sends_to_active_users_only( | |
second_active_user = create_user(email="[email protected]", state="active") | ||
pending_user = create_user(email="[email protected]", state="pending") | ||
service = create_service(user=first_active_user) | ||
print(hilite(f"CREATED THE SERVICE {service} with user {first_active_user}")) | ||
dao_add_user_to_service(service, second_active_user) | ||
print(hilite(f"ADDED user {second_active_user}")) | ||
|
||
dao_add_user_to_service(service, pending_user) | ||
print(hilite(f"ADDED PENDING USER {pending_user}")) | ||
|
||
active_users = dao_fetch_active_users_for_service(service.id) | ||
print(hilite(f"ACTIVE USERS IN THE TEST {active_users}")) | ||
template = create_template(service, template_type=TemplateType.EMAIL) | ||
|
||
send_notification_to_service_users(service_id=service.id, template_id=template.id) | ||
|