summaryrefslogtreecommitdiff
path: root/test/dialect/test_sqlite.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-01-06 10:43:19 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2021-01-15 13:04:58 -0500
commitebbbac0a76b3327a829864afb26ee1b7ff1dc780 (patch)
treeb086b06760255bc0bb76e51624a5e3772bc4cc3d /test/dialect/test_sqlite.py
parent6be06d85e598e4fda6f3d35084e1c5cccb30cee5 (diff)
downloadsqlalchemy-ebbbac0a76b3327a829864afb26ee1b7ff1dc780.tar.gz
update execute() arg formats in modules and tests
continuing with producing a SQLAlchemy 1.4.0b2 that internally does not emit any of its own 2.0 deprecation warnings, migrate the *args and **kwargs passed to execute() methods that now must be a single list or dictionary. Alembic 1.5 is again waiting on this internal consistency to be present so that it can pass all tests with no 2.0 deprecation warnings. Change-Id: If6b792e57c8c5dff205419644ab68e631575a2fa
Diffstat (limited to 'test/dialect/test_sqlite.py')
-rw-r--r--test/dialect/test_sqlite.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py
index 1926c6065..587148525 100644
--- a/test/dialect/test_sqlite.py
+++ b/test/dialect/test_sqlite.py
@@ -106,7 +106,7 @@ class TestTypes(fixtures.TestBase, AssertsExecutionResults):
exc.StatementError,
connection.execute,
select(1).where(bindparam("date", type_=Date)),
- date=str(datetime.date(2007, 10, 30)),
+ dict(date=str(datetime.date(2007, 10, 30))),
)
def test_cant_parse_datetime_message(self, connection):
@@ -305,7 +305,7 @@ class JSONTest(fixtures.TestBase):
value = {"json": {"foo": "bar"}, "recs": ["one", "two"]}
- connection.execute(sqlite_json.insert(), foo=value)
+ connection.execute(sqlite_json.insert(), dict(foo=value))
eq_(connection.scalar(select(sqlite_json.c.foo)), value)
@@ -316,7 +316,7 @@ class JSONTest(fixtures.TestBase):
value = {"json": {"foo": "bar"}}
- connection.execute(sqlite_json.insert(), foo=value)
+ connection.execute(sqlite_json.insert(), dict(foo=value))
eq_(
connection.scalar(select(sqlite_json.c.foo["json"])), value["json"]
@@ -2397,11 +2397,11 @@ class SavepointTest(fixtures.TablesTest):
users = self.tables.users
connection = self.bind.connect()
transaction = connection.begin()
- connection.execute(users.insert(), user_id=1, user_name="user1")
+ connection.execute(users.insert(), dict(user_id=1, user_name="user1"))
trans2 = connection.begin_nested()
- connection.execute(users.insert(), user_id=2, user_name="user2")
+ connection.execute(users.insert(), dict(user_id=2, user_name="user2"))
trans2.rollback()
- connection.execute(users.insert(), user_id=3, user_name="user3")
+ connection.execute(users.insert(), dict(user_id=3, user_name="user3"))
transaction.commit()
eq_(
connection.execute(
@@ -2415,11 +2415,11 @@ class SavepointTest(fixtures.TablesTest):
users = self.tables.users
connection = self.bind.connect()
transaction = connection.begin()
- connection.execute(users.insert(), user_id=1, user_name="user1")
+ connection.execute(users.insert(), dict(user_id=1, user_name="user1"))
trans2 = connection.begin_nested()
- connection.execute(users.insert(), user_id=2, user_name="user2")
+ connection.execute(users.insert(), dict(user_id=2, user_name="user2"))
trans2.commit()
- connection.execute(users.insert(), user_id=3, user_name="user3")
+ connection.execute(users.insert(), dict(user_id=3, user_name="user3"))
transaction.commit()
eq_(
connection.execute(