Exemple #1
0
def app():
    """An application for the tests."""
    _app = create_app(config=TestConfig)
    ctx = _app.test_request_context()
    ctx.push()

    yield _app

    ctx.pop()
Exemple #2
0
def app():
    """An application for the tests."""
    _app = create_app(config=TestConfig)
    ctx = _app.test_request_context()
    ctx.push()

    try:
        yield _app
    finally:
        ctx.pop()
Exemple #3
0
def api():
    """An api instance for the tests, no manager"""
    import os
    # the mere presence of the env var should prevent the manage
    # blueprint from being registered
    os.environ['DOORMAN_NO_MANAGER'] = '1'

    _app = create_app(config=TestConfig)
    ctx = _app.test_request_context()
    ctx.push()

    try:
        yield _app
    finally:
        ctx.pop()
Exemple #4
0
def api():
    """An api instance for the tests, no manager"""
    import os
    # the mere presence of the env var should prevent the manage
    # blueprint from being registered
    os.environ['DOORMAN_NO_MANAGER'] = '1'

    _app = create_app(config=TestConfig)
    ctx = _app.test_request_context()
    ctx.push()

    try:
        yield _app
    finally:
        ctx.pop()
Exemple #5
0
# -*- coding: utf-8 -*-
from doorman.application import create_app
from doorman.settings import CurrentConfig
from doorman.tasks import celery  # noqa

app = create_app(config=CurrentConfig)
Exemple #6
0
# -*- coding: utf-8 -*-
import os

from doorman.application import create_app
from doorman.settings import DevConfig, ProdConfig, TestConfig
from doorman.tasks import celery

if os.environ.get('DOORMAN_ENV') == 'prod':
    CONFIG = ProdConfig
elif os.environ.get('DOORMAN_ENV') == 'test':
    CONFIG = TestConfig
else:
    CONFIG = DevConfig

app = create_app(config=CONFIG)
Exemple #7
0
# -*- coding: utf-8 -*-
from doorman.application import create_app
from doorman.settings import CurrentConfig
from doorman.tasks import celery  # noqa


app = create_app(config=CurrentConfig)
Exemple #8
0
# -*- coding: utf-8 -*-
import os

from doorman.application import create_app
from doorman.settings import DevConfig, ProdConfig, TestConfig


if os.environ.get('DOORMAN_ENV') == 'prod':
    CONFIG = ProdConfig
elif os.environ.get('DOORMAN_ENV') == 'test':
    CONFIG = TestConfig
else:
    CONFIG = DevConfig


app = create_app(config=CONFIG)


from doorman.tasks import celery