test_classes: Use get_user in get_streams function.

This commit is contained in:
Vishnu Ks
2017-07-12 16:37:48 +05:30
committed by Tim Abbott
parent 466c3f92f9
commit 99e78cbead
2 changed files with 31 additions and 27 deletions

View File

@@ -344,12 +344,12 @@ class ZulipTestCase(TestCase):
'HTTP_AUTHORIZATION': u'Basic ' + base64.b64encode(credentials.encode('utf-8')).decode('utf-8')
}
def get_streams(self, email):
# type: (Text) -> List[Text]
def get_streams(self, email, realm):
# type: (Text, Realm) -> List[Text]
"""
Helper function to get the stream names for a user
"""
user_profile = get_user_profile_by_email(email)
user_profile = get_user(email, realm)
subs = Subscription.objects.filter(
user_profile=user_profile,
active=True,