Skip to content

Commit b49d41c

Browse files
committed
execution options
1 parent b12b641 commit b49d41c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pytest_flask_sqlalchemy/fixtures.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ def _engine(pytestconfig, request, _transaction, mocker):
105105
elif version.parse(sa.__version__) < version.parse('1.4'):
106106
engine._contextual_connect.return_value = connection
107107

108+
# Calls to execution_options should return this mocked engine
109+
engine.execution_options.return_value = engine
110+
108111
# References to `Engine.dialect` should redirect to the Connection (this
109112
# is primarily useful for the `autoload` flag in SQLAlchemy, which references
110113
# the Engine dialect to reflect tables)

0 commit comments

Comments
 (0)