コード例 #1
0
ファイル: conftest.py プロジェクト: audrium/reana-server
def base_app(tmp_shared_volume_path):
    """Flask application fixture."""
    config_mapping = {
        "AVAILABLE_WORKFLOW_ENGINES": "serial",
        "SERVER_NAME": "localhost:5000",
        "SECRET_KEY": "SECRET_KEY",
        "TESTING": True,
        "FLASK_ENV": "development",
        "SHARED_VOLUME_PATH": tmp_shared_volume_path,
        "SQLALCHEMY_DATABASE_URI": os.getenv("REANA_SQLALCHEMY_DATABASE_URI"),
        "SQLALCHEMY_TRACK_MODIFICATIONS": False,
    }
    app_ = create_app(config_mapping=config_mapping)
    return app_
コード例 #2
0
def test_create_app():
    """Test create_app() method."""
    create_app()
コード例 #3
0
# -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2017, 2018, 2019, 2020, 2021 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Main entrypoint for REANA-Server."""

from reana_server.factory import create_app

# Needed for flask.with_appcontext decorator to work.
app = create_app()

if __name__ == "__main__":
    app.run(host="0.0.0.0")