mirror of
https://github.com/zulip/zulip.git
synced 2025-10-25 09:03:57 +00:00
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 in1aebf3cabwhich 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 in1aebf3caband this commit fixes it.
This commit is contained in:
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user