From 0d9eaa19fd4f934d2a249bc8fb0191fbac30dd0d Mon Sep 17 00:00:00 2001 From: Šimon Brandner Date: Thu, 28 Apr 2022 13:34:12 -0400 Subject: Use constants for receipt types in tests. (#12582) --- tests/replication/slave/storage/test_receipts.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tests/replication/slave') diff --git a/tests/replication/slave/storage/test_receipts.py b/tests/replication/slave/storage/test_receipts.py index f47d94f690..de19e75b9d 100644 --- a/tests/replication/slave/storage/test_receipts.py +++ b/tests/replication/slave/storage/test_receipts.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +from synapse.api.constants import ReceiptTypes from synapse.replication.slave.storage.receipts import SlavedReceiptsStore from ._base import BaseSlavedStoreTestCase @@ -26,9 +27,13 @@ class SlavedReceiptTestCase(BaseSlavedStoreTestCase): STORE_TYPE = SlavedReceiptsStore def test_receipt(self): - self.check("get_receipts_for_user", [USER_ID, "m.read"], {}) + self.check("get_receipts_for_user", [USER_ID, ReceiptTypes.READ], {}) self.get_success( - self.master_store.insert_receipt(ROOM_ID, "m.read", USER_ID, [EVENT_ID], {}) + self.master_store.insert_receipt( + ROOM_ID, ReceiptTypes.READ, USER_ID, [EVENT_ID], {} + ) ) self.replicate() - self.check("get_receipts_for_user", [USER_ID, "m.read"], {ROOM_ID: EVENT_ID}) + self.check( + "get_receipts_for_user", [USER_ID, ReceiptTypes.READ], {ROOM_ID: EVENT_ID} + ) -- cgit 1.4.1