test_classes: Use get_user in unsubscribe_from_stream.

This commit is contained in:
Vishnu Ks
2017-07-13 00:40:18 +05:30
committed by Tim Abbott
parent 99e78cbead
commit 098569ccb4
3 changed files with 18 additions and 17 deletions

View File

@@ -496,10 +496,10 @@ class ZulipTestCase(TestCase):
bulk_add_subscriptions([stream], [user_profile], from_creation=from_creation)
return stream
def unsubscribe_from_stream(self, email, stream_name):
# type: (Text, Text) -> None
user_profile = get_user_profile_by_email(email)
stream = get_stream(stream_name, user_profile.realm)
def unsubscribe_from_stream(self, email, stream_name, realm):
# type: (Text, Text, Realm) -> None
user_profile = get_user(email, realm)
stream = get_stream(stream_name, realm)
bulk_remove_subscriptions([user_profile], [stream])
# Subscribe to a stream by making an API request