refactor: Make acting_user a mandatory kwarg for do_change_default_all_public_streams.

This commit is contained in:
shanukun
2021-04-08 14:28:47 +05:30
committed by Tim Abbott
parent 8d3c6a2feb
commit 0a21476004
2 changed files with 2 additions and 2 deletions

View File

@@ -4196,7 +4196,7 @@ def do_change_default_events_register_stream(
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:
old_value = user_profile.default_all_public_streams
user_profile.default_all_public_streams = value

View File

@@ -1454,7 +1454,7 @@ class NormalActionsTest(BaseAction):
def test_change_bot_default_all_public_streams(self) -> None:
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)
check_realm_bot_update("events[0]", events[0], "default_all_public_streams")