summary refs log tree commit diff
path: root/tests/storage
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2023-11-07 14:02:09 -0500
committerGitHub <noreply@github.com>2023-11-07 14:02:09 -0500
commit455ef041871fe944a0f3b7b1f5073663f20a99be (patch)
tree4d81ac2b66652be0a2954314ddcdda5252e1078b /tests/storage
parentAvoid executing no-op queries. (#16583) (diff)
downloadsynapse-455ef041871fe944a0f3b7b1f5073663f20a99be.tar.xz
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.
Diffstat (limited to 'tests/storage')
-rw-r--r--tests/storage/test_base.py4
1 files changed, 2 insertions, 2 deletions
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.