Skip to content

Commit

Permalink
Fix test_different_bind_joins UnboundExecutionError
Browse files Browse the repository at this point in the history
sqlalchemy.exc.UnboundExecutionError: Bind key 'other' is not in 'SQLALCHEMY_BINDS' config.
  • Loading branch information
cjmayo committed Jul 29, 2024
1 parent 24c21d7 commit 9845473
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions flask_admin/tests/sqla/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2637,12 +2637,11 @@ class Model2(db.Model):
assert rv.status_code == 200


# TODO: Why this fails?
@pytest.mark.xfail(raises=Exception)
def test_different_bind_joins(app, db, admin):
app.config['SQLALCHEMY_BINDS'] = {
'other': 'sqlite:///'
}
def test_different_bind_joins(request, app):
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///'

db = request.getfixturevalue('db')
admin = request.getfixturevalue('admin')

with app.app_context():
class Model1(db.Model):
Expand Down

0 comments on commit 9845473

Please sign in to comment.