Skip to content
Snippets Groups Projects
Unverified Commit a4c1fdb4 authored by Sean Quah's avatar Sean Quah Committed by GitHub
Browse files

Remove dead code in `tests/storage/test_database.py` (#12197)


Signed-off-by: default avatarSean Quah <seanq@element.io>
parent 15382b1a
No related branches found
Tags v0.10.0-rc5
No related merge requests found
Remove some dead code.
...@@ -13,26 +13,10 @@ ...@@ -13,26 +13,10 @@
# limitations under the License. # limitations under the License.
from synapse.storage.database import make_tuple_comparison_clause from synapse.storage.database import make_tuple_comparison_clause
from synapse.storage.engines import BaseDatabaseEngine
from tests import unittest from tests import unittest
def _stub_db_engine(**kwargs) -> BaseDatabaseEngine:
# returns a DatabaseEngine, circumventing the abc mechanism
# any kwargs are set as attributes on the class before instantiating it
t = type(
"TestBaseDatabaseEngine",
(BaseDatabaseEngine,),
dict(BaseDatabaseEngine.__dict__),
)
# defeat the abc mechanism
t.__abstractmethods__ = set()
for k, v in kwargs.items():
setattr(t, k, v)
return t(None, None)
class TupleComparisonClauseTestCase(unittest.TestCase): class TupleComparisonClauseTestCase(unittest.TestCase):
def test_native_tuple_comparison(self): def test_native_tuple_comparison(self):
clause, args = make_tuple_comparison_clause([("a", 1), ("b", 2)]) clause, args = make_tuple_comparison_clause([("a", 1), ("b", 2)])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment