diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-01-13 19:44:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 19:44:18 -0500 |
commit | 3e0536cd2afb5a640619bd872fc27b068ec3eb9b (patch) | |
tree | c365064c215542412bc86561995b44fffe598565 /tests/rest/admin | |
parent | Fix missing app variable in mail subject (#11745) (diff) | |
download | synapse-3e0536cd2afb5a640619bd872fc27b068ec3eb9b.tar.xz |
Replace uses of simple_insert_many with simple_insert_many_values. (#11742)
This should be (slightly) more efficient and it is simpler to have a single method for inserting multiple values.
Diffstat (limited to 'tests/rest/admin')
-rw-r--r-- | tests/rest/admin/test_registration_tokens.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/rest/admin/test_registration_tokens.py b/tests/rest/admin/test_registration_tokens.py index 81f3ac7f04..8513b1d2df 100644 --- a/tests/rest/admin/test_registration_tokens.py +++ b/tests/rest/admin/test_registration_tokens.py @@ -223,20 +223,13 @@ class ManageRegistrationTokensTestCase(unittest.HomeserverTestCase): # Create all possible single character tokens tokens = [] for c in string.ascii_letters + string.digits + "._~-": - tokens.append( - { - "token": c, - "uses_allowed": None, - "pending": 0, - "completed": 0, - "expiry_time": None, - } - ) + tokens.append((c, None, 0, 0, None)) self.get_success( self.store.db_pool.simple_insert_many( "registration_tokens", - tokens, - "create_all_registration_tokens", + keys=("token", "uses_allowed", "pending", "completed", "expiry_time"), + values=tokens, + desc="create_all_registration_tokens", ) ) |