From bea8ba620b59a7ca673a79af8de95168baf268e8 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Wed, 19 Oct 2016 15:54:19 -0700 Subject: [PATCH] Replace do_add_subscription() in tests/tests.py. --- zerver/tests/tests.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/zerver/tests/tests.py b/zerver/tests/tests.py index e2c39cc058..008c7f8005 100644 --- a/zerver/tests/tests.py +++ b/zerver/tests/tests.py @@ -29,7 +29,7 @@ from zerver.lib.actions import \ get_emails_from_user_ids, do_deactivate_user, do_reactivate_user, \ do_change_is_admin, extract_recipients, \ do_set_realm_name, do_deactivate_realm, \ - do_add_subscription, do_remove_subscription, do_make_stream_private + do_remove_subscription, do_make_stream_private from zerver.lib.notifications import handle_missedmessage_emails from zerver.lib.session_user import get_session_dict_user from zerver.middleware import is_slow_query @@ -912,7 +912,7 @@ class BotTest(ZulipTestCase): self.login("hamlet@zulip.com") user_profile = get_user_profile_by_email("hamlet@zulip.com") stream = get_stream("Denmark", user_profile.realm) - do_add_subscription(user_profile, stream) + self.subscribe_to_stream(user_profile.email, stream.name) do_make_stream_private(user_profile.realm, "Denmark") self.assert_num_bots_equal(0) @@ -975,8 +975,7 @@ class BotTest(ZulipTestCase): # type: () -> None self.login("hamlet@zulip.com") user_profile = get_user_profile_by_email("hamlet@zulip.com") - stream = get_stream("Denmark", user_profile.realm) - do_add_subscription(user_profile, stream) + self.subscribe_to_stream(user_profile.email, 'Denmark') do_make_stream_private(user_profile.realm, "Denmark") self.assert_num_bots_equal(0) @@ -1250,8 +1249,7 @@ class BotTest(ZulipTestCase): # type: () -> None self.login("hamlet@zulip.com") user_profile = get_user_profile_by_email("hamlet@zulip.com") - stream = get_stream("Denmark", user_profile.realm) - do_add_subscription(user_profile, stream) + self.subscribe_to_stream(user_profile.email, "Denmark") do_make_stream_private(user_profile.realm, "Denmark") bot_info = { @@ -1334,8 +1332,7 @@ class BotTest(ZulipTestCase): # type: () -> None self.login("hamlet@zulip.com") user_profile = get_user_profile_by_email("hamlet@zulip.com") - stream = get_stream("Denmark", user_profile.realm) - do_add_subscription(user_profile, stream) + self.subscribe_to_stream(user_profile.email, "Denmark") do_make_stream_private(user_profile.realm, "Denmark") bot_info = {