mirror of https://github.com/zulip/zulip.git
actions: Fix incorrect calls to do_invite_users.
An integer or no argument is supposed to be passed. These weren't caught by mypy because booleans are integers in python, see https://github.com/python/mypy/issues/1757
This commit is contained in:
parent
18ca7bf7f9
commit
1c4ad6769d
|
@ -671,7 +671,7 @@ class NormalActionsTest(BaseAction):
|
|||
streams = []
|
||||
for stream_name in ["Denmark", "Verona"]:
|
||||
streams.append(get_stream(stream_name, self.user_profile.realm))
|
||||
do_invite_users(self.user_profile, ["foo@zulip.com"], streams, False)
|
||||
do_invite_users(self.user_profile, ["foo@zulip.com"], streams)
|
||||
prereg_users = PreregistrationUser.objects.filter(
|
||||
referred_by__realm=self.user_profile.realm
|
||||
)
|
||||
|
@ -705,7 +705,7 @@ class NormalActionsTest(BaseAction):
|
|||
for stream_name in ["Denmark", "Scotland"]:
|
||||
streams.append(get_stream(stream_name, self.user_profile.realm))
|
||||
|
||||
do_invite_users(self.user_profile, ["foo@zulip.com"], streams, False)
|
||||
do_invite_users(self.user_profile, ["foo@zulip.com"], streams)
|
||||
prereg_user = PreregistrationUser.objects.get(email="foo@zulip.com")
|
||||
|
||||
events = self.verify_action(
|
||||
|
|
|
@ -2039,15 +2039,15 @@ so we didn't send them an invitation. We did send invitations to everyone else!"
|
|||
for stream_name in ["Denmark", "Scotland"]:
|
||||
streams.append(get_stream(stream_name, self.user_profile.realm))
|
||||
|
||||
do_invite_users(self.user_profile, ["foo@zulip.com"], streams, False)
|
||||
do_invite_users(self.user_profile, ["foo@zulip.com"], streams)
|
||||
prereg_user = PreregistrationUser.objects.get(email="foo@zulip.com")
|
||||
do_invite_users(self.user_profile, ["foo@zulip.com"], streams, False)
|
||||
do_invite_users(self.user_profile, ["foo@zulip.com"], streams, False)
|
||||
do_invite_users(self.user_profile, ["foo@zulip.com"], streams)
|
||||
do_invite_users(self.user_profile, ["foo@zulip.com"], streams)
|
||||
|
||||
# Also send an invite from a different realm.
|
||||
lear = get_realm("lear")
|
||||
lear_user = self.lear_user("cordelia")
|
||||
do_invite_users(lear_user, ["foo@zulip.com"], [], False)
|
||||
do_invite_users(lear_user, ["foo@zulip.com"], [])
|
||||
|
||||
invites = PreregistrationUser.objects.filter(email__iexact="foo@zulip.com")
|
||||
self.assert_length(invites, 4)
|
||||
|
|
Loading…
Reference in New Issue