mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-22 20:51:58 +00:00
conftests
updated the tests and added invenio-i18 module as install_requires
This commit is contained in:
@@ -18,11 +18,25 @@ import tempfile
|
||||
import pytest
|
||||
from flask import Flask
|
||||
from flask_babelex import Babel
|
||||
from invenio_i18n import InvenioI18N
|
||||
|
||||
from invenio_theme_tugraz import inveniothemetugraz
|
||||
from invenio_theme_tugraz.views import blueprint
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def app():
|
||||
"""Flask app fixture."""
|
||||
app = Flask('myapp')
|
||||
app.config.update(
|
||||
I18N_LANGUAGES=[('en', 'English'), ('de', 'German')],
|
||||
)
|
||||
Babel(app)
|
||||
InvenioI18N(app)
|
||||
app.register_blueprint(create_blueprint_from_app(app))
|
||||
return app
|
||||
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
def celery_config():
|
||||
"""Override pytest-invenio fixture.
|
||||
|
||||
Reference in New Issue
Block a user