test_classes: Use get_user in example_user function.

This commit is contained in:
Vishnu Ks 2017-07-12 15:26:10 +05:30
parent ed0423784d
commit 0b701b52df
1 changed files with 2 additions and 1 deletions

View File

@ -36,6 +36,7 @@ from zerver.models import (
get_stream,
get_user,
get_user_profile_by_email,
get_realm,
get_realm_by_email_domain,
Client,
Message,
@ -231,7 +232,7 @@ class ZulipTestCase(TestCase):
def example_user(self, name):
# type: (str) -> UserProfile
email = self.example_user_map[name]
return get_user_profile_by_email(email)
return get_user(email, get_realm('zulip'))
def mit_user(self, name):
# type: (str) -> UserProfile