diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2021-04-09 01:44:57 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2021-04-09 01:44:57 +0100 |
commit | 0de0fe0fe72bb2e2e0044908b9b89fe489bdff5c (patch) | |
tree | 0c8a3541b2797e8055c8b171cde8d57fcba79227 /tests/storage/test_database.py | |
parent | Changelog (diff) | |
parent | Bugbear: Add Mutable Parameter fixes (#9682) (diff) | |
download | synapse-0de0fe0fe72bb2e2e0044908b9b89fe489bdff5c.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/allow_admins_delist_as_rooms
Diffstat (limited to 'tests/storage/test_database.py')
-rw-r--r-- | tests/storage/test_database.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/tests/storage/test_database.py b/tests/storage/test_database.py index 5a77c84962..a906d30e73 100644 --- a/tests/storage/test_database.py +++ b/tests/storage/test_database.py @@ -36,17 +36,6 @@ def _stub_db_engine(**kwargs) -> BaseDatabaseEngine: class TupleComparisonClauseTestCase(unittest.TestCase): def test_native_tuple_comparison(self): - db_engine = _stub_db_engine(supports_tuple_comparison=True) - clause, args = make_tuple_comparison_clause(db_engine, [("a", 1), ("b", 2)]) + clause, args = make_tuple_comparison_clause([("a", 1), ("b", 2)]) self.assertEqual(clause, "(a,b) > (?,?)") self.assertEqual(args, [1, 2]) - - def test_emulated_tuple_comparison(self): - db_engine = _stub_db_engine(supports_tuple_comparison=False) - clause, args = make_tuple_comparison_clause( - db_engine, [("a", 1), ("b", 2), ("c", 3)] - ) - self.assertEqual( - clause, "(a >= ? AND (a > ? OR (b >= ? AND (b > ? OR c > ?))))" - ) - self.assertEqual(args, [1, 1, 2, 2, 3]) |