예제 #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