Exemple #1
0
def app():
    # make sure the dummy vocab is in place because many tests depend on it
    subjfile = os.path.join(os.path.dirname(__file__), 'corpora',
                            'dummy-subjects.tsv')
    vocab = annif.corpus.SubjectFileTSV(subjfile)
    app = annif.create_app(config_name='annif.default_config.TestingConfig')
    with app.app_context():
        project = annif.project.get_project('dummy-en')
        project.vocab.load_vocabulary(vocab, 'en')
    return app
Exemple #2
0
def app_with_initialize():
    app = annif.create_app(
        config_name='annif.default_config.TestingInitializeConfig')
    return app