Skip to content

Commit

Permalink
tests: remove deprecated flask_babelex
Browse files Browse the repository at this point in the history
  • Loading branch information
kpsherva committed Apr 17, 2023
1 parent a64c48a commit 0e1d479
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ install_requires =
invenio-admin>=1.2.0
invenio-accounts>=1.4.13
invenio-base>=1.2.11
invenio-i18n>=1.3.2
invenio-i18n>=2.0.0

[options.extras_require]
tests =
Expand Down
5 changes: 2 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
import pytest
from flask import Flask
from flask.cli import ScriptInfo
from flask_babelex import Babel
from flask_mail import Mail
from flask_principal import ActionNeed, identity_loaded
from invenio_accounts import InvenioAccounts
from invenio_db import InvenioDB, db
from invenio_i18n import InvenioI18N
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.schema import DropConstraint, DropSequence, DropTable

Expand Down Expand Up @@ -56,9 +56,9 @@ def base_app():
SQLALCHEMY_TRACK_MODIFICATIONS=False,
TESTING=True,
)
Babel(app_)
Mail(app_)
InvenioDB(app_)
InvenioI18N(app_)
InvenioAccounts(app_)
return app_

Expand All @@ -70,7 +70,6 @@ def app(base_app, request):
db.create_all()

def teardown():

with base_app.app_context():
db.drop_all()
identity_loaded.disconnect(load_permissions_on_identity_loaded)
Expand Down
2 changes: 0 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ def role_args(roles):
yield role

for action, roles in action_roles.items():

result = runner.invoke(
access,
["allow", action] + list(role_args(roles)),
Expand Down Expand Up @@ -251,7 +250,6 @@ def role_args(roles):
# Remove all permissions.
#
for action, roles in action_roles.items():

result = runner.invoke(
access,
["remove", action] + list(role_args(roles)),
Expand Down

0 comments on commit 0e1d479

Please sign in to comment.