diff --git a/tests/storage/test__base.py b/tests/storage/test__base.py
index 4899cd5c36..366398e39d 100644
--- a/tests/storage/test__base.py
+++ b/tests/storage/test__base.py
@@ -14,12 +14,18 @@
# limitations under the License.
import secrets
+from typing import Any, Dict, Generator, List, Tuple
+
+from twisted.test.proto_helpers import MemoryReactor
+
+from synapse.server import HomeServer
+from synapse.util import Clock
from tests import unittest
class UpsertManyTests(unittest.HomeserverTestCase):
- def prepare(self, reactor, clock, hs):
+ def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None:
self.storage = hs.get_datastores().main
self.table_name = "table_" + secrets.token_hex(6)
@@ -40,11 +46,13 @@ class UpsertManyTests(unittest.HomeserverTestCase):
)
)
- def _dump_to_tuple(self, res):
+ def _dump_to_tuple(
+ self, res: List[Dict[str, Any]]
+ ) -> Generator[Tuple[int, str, str], None, None]:
for i in res:
yield (i["id"], i["username"], i["value"])
- def test_upsert_many(self):
+ def test_upsert_many(self) -> None:
"""
Upsert_many will perform the upsert operation across a batch of data.
"""
|