From 455ef041871fe944a0f3b7b1f5073663f20a99be Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 7 Nov 2023 14:02:09 -0500 Subject: Avoid updating the same rows multiple times with simple_update_many_txn. (#16609) simple_update_many_txn had a bug in it which would cause each update to be applied twice. --- tests/storage/test_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/storage') diff --git a/tests/storage/test_base.py b/tests/storage/test_base.py index de4fcfe026..f34b6b2dcf 100644 --- a/tests/storage/test_base.py +++ b/tests/storage/test_base.py @@ -363,12 +363,12 @@ class SQLBaseStoreTestCase(unittest.TestCase): self.mock_execute_batch.assert_called_once_with( self.mock_txn, "UPDATE tablename SET col3 = ? WHERE col1 = ? AND col2 = ?", - [("val3", "val1", "val2"), ("val3", "val1", "val2")], + [("val3", "val1", "val2")], ) else: self.mock_txn.executemany.assert_called_once_with( "UPDATE tablename SET col3 = ? WHERE col1 = ? AND col2 = ?", - [("val3", "val1", "val2"), ("val3", "val1", "val2")], + [("val3", "val1", "val2")], ) # key_values and value_values must be the same length. -- cgit 1.5.1