summary refs log tree commit diff
path: root/tests/replication/slave
diff options
context:
space:
mode:
authorŠimon Brandner <simon.bra.ag@gmail.com>2022-04-28 13:34:12 -0400
committerPatrick Cloke <patrickc@matrix.org>2022-04-28 13:34:33 -0400
commit0d9eaa19fd4f934d2a249bc8fb0191fbac30dd0d (patch)
tree830686ffb649b50d689ffc0dcd289988d61fcbcd /tests/replication/slave
parentFix logging of incorrect status codes for disconnected requests (#12580) (diff)
downloadsynapse-0d9eaa19fd4f934d2a249bc8fb0191fbac30dd0d.tar.xz
Use constants for receipt types in tests. (#12582)
Diffstat (limited to 'tests/replication/slave')
-rw-r--r--tests/replication/slave/storage/test_receipts.py11
1 files changed, 8 insertions, 3 deletions
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}
+        )