Add ZulipTestCase.mit_user() function.

This commit is contained in:
Vishnu Ks
2017-05-22 16:26:38 -07:00
committed by Tim Abbott
parent 05951074be
commit 7f06a7fa2a

View File

@@ -218,11 +218,22 @@ class ZulipTestCase(TestCase):
ZOE='ZOE@zulip.com', ZOE='ZOE@zulip.com',
) )
mit_user_map = dict(
sipbtest="sipbtest@mit.edu",
starnine="starnine@mit.edu",
espuser="espuser@mit.edu",
)
def example_user(self, name): def example_user(self, name):
# type: (str) -> UserProfile # type: (str) -> UserProfile
email = self.example_user_map[name] email = self.example_user_map[name]
return get_user_profile_by_email(email) return get_user_profile_by_email(email)
def mit_user(self, name):
# type: (str) -> UserProfile
email = self.mit_user_map[name]
return get_user_profile_by_email(email)
def notification_bot(self): def notification_bot(self):
# type: () -> UserProfile # type: () -> UserProfile
return get_user_profile_by_email('notification-bot@zulip.com') return get_user_profile_by_email('notification-bot@zulip.com')