diff options
author | Gord Thompson <gord@gordthompson.com> | 2021-02-13 14:43:21 -0700 |
---|---|---|
committer | Gord Thompson <gord@gordthompson.com> | 2021-02-15 11:16:38 -0700 |
commit | 857adaaf867df54d4a023cf19f618fdf1d0f60c9 (patch) | |
tree | 6079150053100063a2b865c7b2c9702dbcab7e3a /test/dialect/test_sqlite.py | |
parent | d642946939416ea2870cf6c6479dcddad795b622 (diff) | |
download | sqlalchemy-857adaaf867df54d4a023cf19f618fdf1d0f60c9.tar.gz |
Accept ColumnCollection in update_on_conflict(set_=
Fixes: #5939
Change-Id: I21d7125765028e2a98d5ef4c32d8e7e457aa2d12
Diffstat (limited to 'test/dialect/test_sqlite.py')
-rw-r--r-- | test/dialect/test_sqlite.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/dialect/test_sqlite.py b/test/dialect/test_sqlite.py index ad169eebf..aee97e8c6 100644 --- a/test/dialect/test_sqlite.py +++ b/test/dialect/test_sqlite.py @@ -2810,7 +2810,13 @@ class OnConflictTest(fixtures.TablesTest): [(1, "name1")], ) - def test_on_conflict_do_update_one(self, connection): + @testing.combinations( + ("with_dict", True), + ("issue_5939", False), + id_="ia", + argnames="with_dict", + ) + def test_on_conflict_do_update_one(self, connection, with_dict): users = self.tables.users conn = connection @@ -2818,7 +2824,8 @@ class OnConflictTest(fixtures.TablesTest): i = insert(users) i = i.on_conflict_do_update( - index_elements=[users.c.id], set_=dict(name=i.excluded.name) + index_elements=[users.c.id], + set_=dict(name=i.excluded.name) if with_dict else i.excluded, ) result = conn.execute(i, dict(id=1, name="name1")) |