mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-25 15:56:28 -05:00
Require types in tests.storage. (#14646)
Adds missing type hints to `tests.storage` package and does not allow untyped definitions.
This commit is contained in:
parent
94bc21e69f
commit
3ac412b4e2
36 changed files with 489 additions and 341 deletions
|
|
@ -33,7 +33,7 @@ class ReceiptsBackgroundUpdateStoreTestCase(HomeserverTestCase):
|
|||
login.register_servlets,
|
||||
]
|
||||
|
||||
def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer):
|
||||
def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None:
|
||||
self.store = hs.get_datastores().main
|
||||
self.user_id = self.register_user("foo", "pass")
|
||||
self.token = self.login("foo", "pass")
|
||||
|
|
@ -47,7 +47,7 @@ class ReceiptsBackgroundUpdateStoreTestCase(HomeserverTestCase):
|
|||
table: str,
|
||||
receipts: Dict[Tuple[str, str, str], Sequence[Dict[str, Any]]],
|
||||
expected_unique_receipts: Dict[Tuple[str, str, str], Optional[Dict[str, Any]]],
|
||||
):
|
||||
) -> None:
|
||||
"""Test that the background update to uniqueify non-thread receipts in
|
||||
the given receipts table works properly.
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ class ReceiptsBackgroundUpdateStoreTestCase(HomeserverTestCase):
|
|||
f"Background update did not remove all duplicate receipts from {table}",
|
||||
)
|
||||
|
||||
def test_background_receipts_linearized_unique_index(self):
|
||||
def test_background_receipts_linearized_unique_index(self) -> None:
|
||||
"""Test that the background update to uniqueify non-thread receipts in
|
||||
`receipts_linearized` works properly.
|
||||
"""
|
||||
|
|
@ -177,7 +177,7 @@ class ReceiptsBackgroundUpdateStoreTestCase(HomeserverTestCase):
|
|||
},
|
||||
)
|
||||
|
||||
def test_background_receipts_graph_unique_index(self):
|
||||
def test_background_receipts_graph_unique_index(self) -> None:
|
||||
"""Test that the background update to uniqueify non-thread receipts in
|
||||
`receipts_graph` works properly.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue