summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/test_deprecations.py5
-rw-r--r--test/sql/test_resultset.py10
2 files changed, 12 insertions, 3 deletions
diff --git a/test/sql/test_deprecations.py b/test/sql/test_deprecations.py
index 8bdba2793..06fe22fed 100644
--- a/test/sql/test_deprecations.py
+++ b/test/sql/test_deprecations.py
@@ -1582,9 +1582,8 @@ class ResultProxyTest(fixtures.TablesTest):
text("select * from users where user_id=2")
).first()
- with testing.expect_deprecated(
- r"The Row.keys\(\) method is deprecated and will be "
- "removed in a future release."
+ with testing.expect_deprecated_20(
+ r"The Row.keys\(\) function/method is considered legacy "
):
eq_(r.keys(), ["user_id", "user_name"])
diff --git a/test/sql/test_resultset.py b/test/sql/test_resultset.py
index 2a6851a99..87886c4fa 100644
--- a/test/sql/test_resultset.py
+++ b/test/sql/test_resultset.py
@@ -1030,6 +1030,16 @@ class ResultProxyTest(fixtures.TablesTest):
eq_(list(row._mapping.keys()), ["user_id", "user_name"])
eq_(row._fields, ("user_id", "user_name"))
+ def test_row_keys_legacy_dont_warn(self):
+ users = self.tables.users
+
+ users.insert().execute(user_id=1, user_name="foo")
+ result = users.select().execute()
+ row = result.first()
+ # DO NOT WARN DEPRECATED IN 1.x, ONLY 2.0 WARNING
+ eq_(dict(row), {"user_id": 1, "user_name": "foo"})
+ eq_(row.keys(), ["user_id", "user_name"])
+
def test_keys_anon_labels(self):
"""test [ticket:3483]"""