Ignore:
Timestamp:
Apr 7, 2020, 5:29:07 PM (7 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, master
Children:
bc7bf4f
Parents:
cc107a8
Message:
  • Added Celery to the testing initialisation
    • Ommitting log creation for demo puproses, if no CELERY_BROKER is set, because the tasks.delay() call never times out, if no broker is running
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mapservice/codegen/templates/__init__test.mustache

    rcc107a8 rbe66b78  
    11import logging
    22
     3import flask
    34import connexion
    45from flask_cors import CORS
    56from flask_testing import TestCase
    67from sqlalchemy.event import listen
     8from celery import Celery
    79
    810from {{packageName}}.encoder import JSONEncoder
    … …  
    2022
    2123                application.config.from_object('{{packageName}}.server_impl.Config.TestingConfig')
     24                celery = Celery(__name__, broker=application.config['CELERY_BROKER_URL'])
     25                celery.config_from_object(application.config)
    2226                db.init_app(application)
    2327                application.app_context().push()
Note: See TracChangeset for help on using the changeset viewer.