Example #1
0
def app():
    """
    Creates a new Flask app for testing
    """

    _app = create_app('testing')
    app_ctx = _app.app_context()
    app_ctx.push()
    aeon_ztp.db.create_all()
    yield _app
    # Teardown code
    aeon_ztp.db.drop_all()
    app_ctx.pop()
Example #2
0
def test_create_app(mock_db, mock_ma, mock_flask):
    test_app = create_app()
    # Assert that app is created with production config by default
    config = test_app.method_calls[0][1][0]
    assert config == aeon_ztp.config['production']
Example #3
0
# Copyright 2014-present, Apstra, Inc. All rights reserved.
#
# This source code is licensed under End User License Agreement found in the
# LICENSE file at http://www.apstra.com/community/eula

from aeon_ztp import create_app

app = create_app('production')