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)