]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
simplify `test_on_duplicate_key_update_expression_multirow` 7285/head
authorCristian Sabaila <cristian.sabaila@geotogether.com>
Tue, 2 Nov 2021 23:15:12 +0000 (01:15 +0200)
committerCristian Sabaila <cristian.sabaila@geotogether.com>
Tue, 2 Nov 2021 23:15:12 +0000 (01:15 +0200)
test/dialect/mysql/test_on_duplicate.py

index 544227af705152109fe86da306892d5d305a62bc..5a4e6ca8d5cc10cf6d9898404103c5cf709b99dc 100644 (file)
@@ -105,15 +105,14 @@ class OnDuplicateTest(fixtures.TablesTest):
         )
         result = conn.execute(stmt)
         eq_(result.inserted_primary_key, (None,))
-        # first entry triggers ON DUPLICATE
         eq_(
-            conn.execute(foos.select().where(foos.c.id == 1)).fetchall(),
-            [(1, "ab_foo", "ab_bz", False)],
-        )
-        # second entry should be an insert
-        eq_(
-            conn.execute(foos.select().where(foos.c.id == 2)).fetchall(),
-            [(2, "b", None, False)],
+            conn.execute(foos.select()).fetchall(),
+            [
+                # first entry triggers ON DUPLICATE
+                (1, "ab_foo", "ab_bz", False),
+                # second entry must be an insert
+                (2, "b", None, False),
+            ],
         )
 
     def test_on_duplicate_key_update_preserve_order(self, connection):