Fixing up tests to validate the call to the celery tasks.

- mocker used to test call or otherwise of the task
- no new tests just a spring clean
This commit is contained in:
Martyn Inglis
2016-02-16 14:06:56 +00:00
parent 655beddba6
commit e42da7dd54
7 changed files with 129 additions and 136 deletions

View File

@@ -1,12 +1,12 @@
from itsdangerous import URLSafeSerializer
from app import celery, twilio_client, db
from app import notify_celery, twilio_client, db
from app.clients.sms.twilio import TwilioClientException
from app.dao.templates_dao import get_model_templates
from app.models import Notification
from flask import current_app
@celery.task(name="send-sms", bind="True")
@notify_celery.task(name="send-sms", bind="True")
def send_sms(service_id, notification_id, encrypted_notification, secret_key, salt):
serializer = URLSafeSerializer(secret_key)