tests: Remove unnecessary use of do_change_user_role in test_subs.

This commit removes the unnecessary do_change_user_role function
in test_can_subcribe_other_users. This was added in 1aebf3cab
which replaced the multiple functions like do_change_is_admin
and do_change_is_guest with do_change_user_role.

Previously two functions do_change_is_admin and do_change_is_guest
were used because there were two flags is_realm_admin and is_guest
which were used to determine the role of a user. But then we added
a single field role to UserProfile and removed the multiple flags
and thus also replaced the different functions with a single
do_change_user_role. With addition of a new field role, two
different do_change_* functions were not needed as we only have
a role field instead of different flags, but this was missed in
1aebf3cab and this commit fixes it.
This commit is contained in:
sahil839
2021-03-21 23:17:10 +05:30
committed by Tim Abbott
parent 57d79e8fd6
commit bc72d2dbc4

View File

@@ -3285,7 +3285,6 @@ class SubscriptionAPITest(ZulipTestCase):
do_change_user_role(othello, UserProfile.ROLE_REALM_ADMINISTRATOR)
self.assertTrue(othello.can_subscribe_other_users())
do_change_user_role(othello, UserProfile.ROLE_MEMBER)
do_change_user_role(othello, UserProfile.ROLE_GUEST)
self.assertFalse(othello.can_subscribe_other_users())