summaryrefslogtreecommitdiff
path: root/tests/sqlalchemy/test_sqlalchemy.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sqlalchemy/test_sqlalchemy.py')
-rw-r--r--tests/sqlalchemy/test_sqlalchemy.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/sqlalchemy/test_sqlalchemy.py b/tests/sqlalchemy/test_sqlalchemy.py
index 5099c44..5ba3207 100644
--- a/tests/sqlalchemy/test_sqlalchemy.py
+++ b/tests/sqlalchemy/test_sqlalchemy.py
@@ -614,11 +614,11 @@ class PatchStacktraceTest(test_base.DbTestCase):
def test_trace(self):
engine = self.engine
- engine.connect()
+ session._add_trace_comments(engine)
+ conn = engine.connect()
with mock.patch.object(engine.dialect, "do_execute") as mock_exec:
- session._add_trace_comments(engine)
- engine.execute("select * from table")
+ conn.execute("select * from table")
call = mock_exec.mock_calls[0]