mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
tests: Limit email-based logins.
We now have this API...
If you really just need to log in
and not do anything with the actual
user:
self.login('hamlet')
If you're gonna use the user in the
rest of the test:
hamlet = self.example_user('hamlet')
self.login_user(hamlet)
If you are specifically testing
email/password logins (used only in 4 places):
self.login_by_email(email, password)
And for failures uses this (used twice):
self.assert_login_failure(email)
This commit is contained in:
@@ -256,7 +256,7 @@ class TestServiceBotStateHandler(ZulipTestCase):
|
||||
|
||||
def test_internal_endpoint(self):
|
||||
# type: () -> None
|
||||
self.login(self.user_profile.email)
|
||||
self.login_user(self.user_profile)
|
||||
|
||||
# Store some data.
|
||||
initial_dict = {'key 1': 'value 1', 'key 2': 'value 2', 'key 3': 'value 3'}
|
||||
|
||||
Reference in New Issue
Block a user