summary refs log tree commit diff
path: root/tests/replication/test_account_validity.py
diff options
context:
space:
mode:
authorMathieu Velten <mathieuv@matrix.org>2022-08-11 14:26:40 +0200
committerMathieu Velten <mathieuv@matrix.org>2022-08-12 16:20:26 +0200
commit941ab4b483e24997106e2478e37057450c4f9c14 (patch)
treeb583812cce5c928935e234e52e5910ea36de0a68 /tests/replication/test_account_validity.py
parentAdd test for account validity feature (diff)
downloadsynapse-941ab4b483e24997106e2478e37057450c4f9c14.tar.xz
Add cache invalidation to module API github/mv/test-account-validity mv/test-account-validity
Diffstat (limited to 'tests/replication/test_account_validity.py')
-rw-r--r--tests/replication/test_account_validity.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/replication/test_account_validity.py b/tests/replication/test_account_validity.py

index 408eb266b9..7353bbce96 100644 --- a/tests/replication/test_account_validity.py +++ b/tests/replication/test_account_validity.py
@@ -33,6 +33,8 @@ class MockAccountValidityStore: ): self._api = api + api.register_cached_function(self.is_user_expired) + async def create_db(self): def create_table_txn(txn: LoggingTransaction): txn.execute( @@ -88,13 +90,13 @@ class MockAccountValidityStore: ), ) - txn.call_after(self.is_user_expired.invalidate, (user_id,)) - await self._api.run_db_interaction( "account_validity_set_expired_user", set_expired_user_txn, ) + await self._api.invalidate_cache(self.is_user_expired, (user_id,)) + class MockAccountValidity: def __init__(