Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix to error I was getting with sa 1.4 #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pytest_flask_sqlalchemy/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def _engine(pytestconfig, request, _transaction, mocker):
if version.parse(sa.__version__) < version.parse('1.3'):
engine.contextual_connect.return_value = connection
elif version.parse(sa.__version__) < version.parse('1.4'):
engine._contextual_connect.return_value = connection
class Cc:
return_value = connection
engine._contextual_connect = Cc
Comment on lines +106 to +108

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could someone review that, please?


# References to `Engine.dialect` should redirect to the Connection (this
# is primarily useful for the `autoload` flag in SQLAlchemy, which references
Expand Down