- wrap apply_async parameter notification_id in a str() argument

- check if service_callback_api exist before putting tasks on queue
- create_service_callback_api in tests before asserting if send_delivery_status_to_service has been called.
This commit is contained in:
venusbb
2017-12-04 14:48:23 +00:00
parent 771ce9e2bc
commit 5482ee4fe7
10 changed files with 48 additions and 21 deletions

View File

@@ -30,7 +30,7 @@ from app.dao.notifications_dao import (
set_scheduled_notification_to_processed,
update_notification_status_by_id,
update_notification_status_by_reference,
dao_get_notifications_by_reference
dao_get_notifications_by_references
)
from app.dao.services_dao import dao_update_service
from app.models import (
@@ -1997,7 +1997,7 @@ def test_dao_get_notifications_by_reference(sample_template):
notification_1 = create_notification(template=sample_template, reference='ref')
notification_2 = create_notification(template=sample_template, reference='ref')
notifications = dao_get_notifications_by_reference(['ref'])
notifications = dao_get_notifications_by_references(['ref'])
assert len(notifications) == 2
assert notifications[0].id in [notification_1.id, notification_2.id]
assert notifications[1].id in [notification_1.id, notification_2.id]