Finished celery refactor - set up config for queue prefix

LEO notes: Also made sure the Test BROKER_URL is preserved so that
tests warn you when celery isn't mocked out
This commit is contained in:
Martyn Inglis
2017-06-09 16:20:02 +01:00
committed by Leo Hemsted
parent 786adb5d71
commit 0e9e8955f7
4 changed files with 33 additions and 20 deletions

View File

@@ -1,14 +1,21 @@
import pytest
from sqlalchemy.exc import SQLAlchemyError
from app import create_uuid
from app.celery.statistics_tasks import (
record_initial_job_statistics,
record_outcome_job_statistics,
create_initial_notification_statistic_tasks,
create_outcome_notification_statistic_tasks)
from sqlalchemy.exc import SQLAlchemyError
from app import create_uuid
from app.models import (
NOTIFICATION_STATUS_TYPES_COMPLETED,
NOTIFICATION_SENDING,
NOTIFICATION_PENDING,
NOTIFICATION_CREATED,
NOTIFICATION_DELIVERED
)
from tests.app.conftest import sample_notification
from app.models import NOTIFICATION_STATUS_TYPES_COMPLETED, NOTIFICATION_SENT, NOTIFICATION_SENDING, \
NOTIFICATION_PENDING, NOTIFICATION_CREATED, NOTIFICATION_DELIVERED
def test_should_create_initial_job_task_if_notification_is_related_to_a_job(