mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
refactor: Make acting_user a mandatory kwarg for do_change_default_all_public_streams.
This commit is contained in:
@@ -4196,7 +4196,7 @@ def do_change_default_events_register_stream(
|
|||||||
|
|
||||||
|
|
||||||
def do_change_default_all_public_streams(
|
def do_change_default_all_public_streams(
|
||||||
user_profile: UserProfile, value: bool, acting_user: Optional[UserProfile] = None
|
user_profile: UserProfile, value: bool, *, acting_user: Optional[UserProfile]
|
||||||
) -> None:
|
) -> None:
|
||||||
old_value = user_profile.default_all_public_streams
|
old_value = user_profile.default_all_public_streams
|
||||||
user_profile.default_all_public_streams = value
|
user_profile.default_all_public_streams = value
|
||||||
|
|||||||
@@ -1454,7 +1454,7 @@ class NormalActionsTest(BaseAction):
|
|||||||
|
|
||||||
def test_change_bot_default_all_public_streams(self) -> None:
|
def test_change_bot_default_all_public_streams(self) -> None:
|
||||||
bot = self.create_bot("test")
|
bot = self.create_bot("test")
|
||||||
action = lambda: do_change_default_all_public_streams(bot, True)
|
action = lambda: do_change_default_all_public_streams(bot, True, acting_user=None)
|
||||||
events = self.verify_action(action)
|
events = self.verify_action(action)
|
||||||
check_realm_bot_update("events[0]", events[0], "default_all_public_streams")
|
check_realm_bot_update("events[0]", events[0], "default_all_public_streams")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user