mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
refactor: Make acting_user a mandatory kwarg for do_set_realm_notifications_stream.
This commit is contained in:
@@ -908,10 +908,7 @@ def do_set_realm_message_editing(
|
||||
|
||||
|
||||
def do_set_realm_notifications_stream(
|
||||
realm: Realm,
|
||||
stream: Optional[Stream],
|
||||
stream_id: int,
|
||||
acting_user: Optional[UserProfile] = None,
|
||||
realm: Realm, stream: Optional[Stream], stream_id: int, *, acting_user: Optional[UserProfile]
|
||||
) -> None:
|
||||
old_value = realm.notifications_stream_id
|
||||
realm.notifications_stream = stream
|
||||
|
||||
@@ -1152,7 +1152,10 @@ class NormalActionsTest(BaseAction):
|
||||
for notifications_stream, notifications_stream_id in ((stream, stream.id), (None, -1)):
|
||||
events = self.verify_action(
|
||||
lambda: do_set_realm_notifications_stream(
|
||||
self.user_profile.realm, notifications_stream, notifications_stream_id
|
||||
self.user_profile.realm,
|
||||
notifications_stream,
|
||||
notifications_stream_id,
|
||||
acting_user=None,
|
||||
)
|
||||
)
|
||||
check_realm_update("events[0]", events[0], "notifications_stream_id")
|
||||
|
||||
Reference in New Issue
Block a user