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/postgresql | |
| 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/postgresql')
| -rw-r--r-- | test/dialect/postgresql/test_on_conflict.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/dialect/postgresql/test_on_conflict.py b/test/dialect/postgresql/test_on_conflict.py index 4e96cc6a2..489084de7 100644 --- a/test/dialect/postgresql/test_on_conflict.py +++ b/test/dialect/postgresql/test_on_conflict.py @@ -176,14 +176,21 @@ 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 connection.execute(users.insert(), dict(id=1, name="name1")) 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 = connection.execute(i, dict(id=1, name="name1")) |
