Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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