Пример #1
0
def app():
    """An application for the tests."""
    _app = create_app(TestConfig)

    ctx = _app.test_request_context()
    ctx.push()

    yield _app

    ctx.pop()
Пример #2
0
from flask import Flask
from DASiGraph import app

if __name__ == "__main__":
    myapp = app.create_app("config")
    myapp.run(debug=True)
Пример #3
0
def test_dev_config():
    """Development config."""
    app = create_app(DevConfig)
    assert app.config['ENV'] == 'dev'
    assert app.config['DEBUG']
Пример #4
0
def test_production_config():
    """Production config."""
    app = create_app(ProdConfig)
    assert app.config['ENV'] == 'prod'
    assert not app.config['DEBUG']
Пример #5
0
def test_default_config():
    app = create_app()
    assert app.config['ENV'] == 'prod'