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:
1
setup.py
1
setup.py
@@ -45,6 +45,7 @@ install_requires = [
|
|||||||
'Flask-BabelEx>=0.9.4',
|
'Flask-BabelEx>=0.9.4',
|
||||||
'Flask-WebpackExt>=1.0.0',
|
'Flask-WebpackExt>=1.0.0',
|
||||||
'invenio-assets>=1.2.0,<1.3.0',
|
'invenio-assets>=1.2.0,<1.3.0',
|
||||||
|
'invenio-i18n>=1.2.0',
|
||||||
]
|
]
|
||||||
|
|
||||||
packages = find_packages()
|
packages = find_packages()
|
||||||
|
|||||||
@@ -18,11 +18,25 @@ import tempfile
|
|||||||
import pytest
|
import pytest
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask_babelex import Babel
|
from flask_babelex import Babel
|
||||||
|
from invenio_i18n import InvenioI18N
|
||||||
|
|
||||||
from invenio_theme_tugraz import inveniothemetugraz
|
from invenio_theme_tugraz import inveniothemetugraz
|
||||||
from invenio_theme_tugraz.views import blueprint
|
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')
|
@pytest.fixture(scope='module')
|
||||||
def celery_config():
|
def celery_config():
|
||||||
"""Override pytest-invenio fixture.
|
"""Override pytest-invenio fixture.
|
||||||
|
|||||||
Reference in New Issue
Block a user