From 81194df65d9fc85fb6f463a9a6ba7ba66f99014b Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 19 Mar 2017 21:26:12 -0700 Subject: [PATCH] test_bots: Add stream is not None asserts. --- zerver/tests/test_bots.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zerver/tests/test_bots.py b/zerver/tests/test_bots.py index 7f6afc690b..76a48363fa 100644 --- a/zerver/tests/test_bots.py +++ b/zerver/tests/test_bots.py @@ -226,6 +226,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) + assert stream is not None self.subscribe_to_stream(user_profile.email, stream.name) do_change_stream_invite_only(stream, True) @@ -264,6 +265,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) + assert stream is not None self.unsubscribe_from_stream("hamlet@zulip.com", "Denmark") do_change_stream_invite_only(stream, True) @@ -328,6 +330,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) + assert stream is not None self.unsubscribe_from_stream("hamlet@zulip.com", "Denmark") do_change_stream_invite_only(stream, True) @@ -625,6 +628,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) + assert stream is not None self.unsubscribe_from_stream("hamlet@zulip.com", "Denmark") do_change_stream_invite_only(stream, True) @@ -707,6 +711,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) + assert stream is not None self.unsubscribe_from_stream("hamlet@zulip.com", "Denmark") do_change_stream_invite_only(stream, True)