refactor: Make acting_user a mandatory kwarg for bulk_remove_subscriptions.

This commit is contained in:
shanukun
2021-04-02 22:18:08 +05:30
committed by Tim Abbott
parent 0bf067b681
commit bcc3bb03fe
4 changed files with 9 additions and 6 deletions

View File

@@ -1570,7 +1570,7 @@ class NormalActionsTest(BaseAction):
stream = get_stream("test_stream", self.user_profile.realm)
action = lambda: bulk_remove_subscriptions(
[self.example_user("othello")], [stream], get_client("website")
[self.example_user("othello")], [stream], get_client("website"), acting_user=None
)
events = self.verify_action(action)
check_subscription_peer_remove("events[0]", events[0])
@@ -1968,7 +1968,7 @@ class SubscribeActionTest(BaseAction):
# Now remove the first user, to test the normal unsubscribe flow and
# 'peer_remove' event for subscribed streams.
action = lambda: bulk_remove_subscriptions(
[self.example_user("othello")], [stream], get_client("website")
[self.example_user("othello")], [stream], get_client("website"), acting_user=None
)
events = self.verify_action(
action,
@@ -1979,7 +1979,7 @@ class SubscribeActionTest(BaseAction):
# Now remove the user himself, to test the 'remove' event flow
action = lambda: bulk_remove_subscriptions(
[self.example_user("hamlet")], [stream], get_client("website")
[self.example_user("hamlet")], [stream], get_client("website"), acting_user=None
)
events = self.verify_action(
action, include_subscribers=include_subscribers, include_streams=False, num_events=2
@@ -2003,7 +2003,7 @@ class SubscribeActionTest(BaseAction):
# Remove the user to test 'peer_remove' event flow for unsubscribed stream.
action = lambda: bulk_remove_subscriptions(
[self.example_user("iago")], [stream], get_client("website")
[self.example_user("iago")], [stream], get_client("website"), acting_user=None
)
events = self.verify_action(
action,