Celery tests

This commit is contained in:
Martyn Inglis
2016-02-09 13:31:45 +00:00
parent 1a7c521ebb
commit fb41acdac9
9 changed files with 84 additions and 5 deletions

View File

@@ -11,12 +11,13 @@ from werkzeug.local import LocalProxy
from config import configs
from utils import logging
from notify_client import NotifyAPIClient
from app.celery.celery import NotifyCelery
db = SQLAlchemy()
ma = Marshmallow()
notify_alpha_client = NotifyAPIClient()
celery = NotifyCelery()
api_user = LocalProxy(lambda: _request_ctx_stack.top.api_user)
@@ -32,6 +33,8 @@ def create_app(config_name, config_overrides=None):
logging.init_app(application)
notify_alpha_client.init_app(application)
celery.init_app(application)
from app.service.rest import service as service_blueprint
from app.user.rest import user as user_blueprint
from app.template.rest import template as template_blueprint
@@ -75,6 +78,7 @@ def init_app(app, config_overrides):
return response
def convert_to_boolean(value):
"""Turn strings to bools if they look like them