mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
tornado: Make process_notification hack avoid import loops.
This fixes a problem where we could not import zerver.lib.streams from zerver.lib.message, which would otherwise be reasonable, because the former implicitly imported many modules due to this issue.
This commit is contained in:
@@ -1329,7 +1329,7 @@ Output:
|
||||
# so mypy doesn't allow assigning lst.append to process_notification
|
||||
# So explicitly change parameter name to 'notice' to work around this problem
|
||||
with mock.patch(
|
||||
"zerver.tornado.django_api.process_notification", lambda notice: lst.append(notice)
|
||||
"zerver.tornado.event_queue.process_notification", lambda notice: lst.append(notice)
|
||||
):
|
||||
# Some `send_event` calls need to be executed only after the current transaction
|
||||
# commits (using `on_commit` hooks). Because the transaction in Django tests never
|
||||
|
||||
Reference in New Issue
Block a user