mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
Add ZulipTestCase.mit_user() function.
This commit is contained in:
@@ -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')
|
||||||
|
|||||||
Reference in New Issue
Block a user