From 13b25cf51e41e30104c628032284b045a052bcc0 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 3 Dec 2021 20:01:10 +0000 Subject: Fix tests to mock _TransactionController.send of ApplicationServiceScheduler.enqueue* With enqueue_for_appservice being called per-event per-appservice, it's not a great target for mocking. So we use _TransactionController.send instead, to track things that are actually sent out to AS's. This also has the benefit of testing a wider bit of the AS txn pipeline --- synapse/appservice/scheduler.py | 1 + 1 file changed, 1 insertion(+) (limited to 'synapse/appservice') diff --git a/synapse/appservice/scheduler.py b/synapse/appservice/scheduler.py index 305e751d46..31b297c7a1 100644 --- a/synapse/appservice/scheduler.py +++ b/synapse/appservice/scheduler.py @@ -207,6 +207,7 @@ class _TransactionController: """ Create a transaction with the given data and send to the provided application service. + Args: service: The application service to send the transaction to. events: The persistent events to include in the transaction. -- cgit 1.5.1