Пример #1
0
def test_create_app_missing_requirement(mock_app):
    """Tests the function that creates the app when phenotype_annotation.tab.txt and hp.obo.txt
    resources are missing"""

    # GIVEN one of the required files missing / it's been renamed
    temp_file = ".".join([path_to_hpo_terms, "temp"])
    os.rename(path_to_hpo_terms, temp_file)

    # THEN the app should not be created
    app = create_app()
    assert app is None

    # Revert original resource name
    os.rename(temp_file, path_to_hpo_terms)
Пример #2
0
def test_create_app():
    """Tests the function that creates the app"""

    assert create_app()
Пример #3
0
from werkzeug.contrib.fixers import ProxyFix

from patientMatcher.server import create_app

app = create_app()

app.wsgi_app = ProxyFix(app.wsgi_app)
Пример #4
0
def mock_app(database, pymongo_client):
    app = create_app()
    app.db = database
    app.client = pymongo_client
    return app