Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tests: Use built-in users instead of creating new users in tests.
Vector739eda1f11cac4
diff --git a/zerver/tests/test_channel_fetch.py b/zerver/tests/test_channel_fetch.pyindex 9f8264eef5c..d389011a2ab 100644--- a/zerver/tests/test_channel_fetch.py+++ b/zerver/tests/test_channel_fetch.py@@ -10,7 +10,6 @@ from zerver.actions.streams import (do_change_stream_permission,do_deactivate_stream,)-from zerver.lib.create_user import create_userfrom zerver.lib.email_mirror_helpers import encode_email_address, get_channel_email_tokenfrom zerver.lib.subscription_info import gather_subscriptions, gather_subscriptions_helperfrom zerver.lib.test_classes import ZulipTestCase@@ -666,15 +665,8 @@ class GetSubscribersTest(ZulipTestCase):@override_settings(MIN_PARTIAL_SUBSCRIBERS_CHANNEL_SIZE=5)def test_gather_partial_subscriptions(self) -> None:othello = self.example_user("othello")- idle_users = [- create_user(- email=f"original_user{i}@zulip.com",- password=None,- realm=othello.realm,- full_name=f"Full Name {i}",- )- for i in range(5)- ]+ user_names = ["iago", "cordelia", "polonius", "shiva", "prospero"]+ idle_users = [self.example_user(name) for name in user_names]for user in idle_users:user.long_term_idle = Trueuser.save()@@ -777,15 +769,8 @@ class GetSubscribersTest(ZulipTestCase):@override_settings(MIN_PARTIAL_SUBSCRIBERS_CHANNEL_SIZE=5)def test_gather_partial_subscriptions_api(self) -> None:othello = self.example_user("othello")- idle_users = [- create_user(- email=f"original_user{i}@zulip.com",- password=None,- realm=othello.realm,- full_name=f"Full Name {i}",- )- for i in range(5)- ]+ user_names = ["iago", "cordelia", "polonius", "shiva", "prospero"]+ idle_users = [self.example_user(name) for name in user_names]for user in idle_users:user.long_term_idle = Trueuser.save()