summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/assertions.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing/assertions.py')
-rw-r--r--lib/sqlalchemy/testing/assertions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py
index 87e5ba0d2..ba4a2de72 100644
--- a/lib/sqlalchemy/testing/assertions.py
+++ b/lib/sqlalchemy/testing/assertions.py
@@ -168,7 +168,9 @@ def _expect_warnings(
else:
real_warn(msg, *arg, **kw)
- with mock.patch("warnings.warn", our_warn):
+ with mock.patch("warnings.warn", our_warn), mock.patch(
+ "sqlalchemy.util.SQLALCHEMY_WARN_20", True
+ ), mock.patch("sqlalchemy.engine.row.LegacyRow._default_key_style", 2):
yield
if assert_ and (not py2konly or not compat.py3k):