mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +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:
		@@ -47,7 +47,7 @@ class TestHotspots(ZulipTestCase):
 | 
			
		||||
 | 
			
		||||
    def test_hotspots_url_endpoint(self) -> None:
 | 
			
		||||
        user = self.example_user('hamlet')
 | 
			
		||||
        self.login(user.email)
 | 
			
		||||
        self.login_user(user)
 | 
			
		||||
        result = self.client_post('/json/users/me/hotspots',
 | 
			
		||||
                                  {'hotspot': ujson.dumps('intro_reply')})
 | 
			
		||||
        self.assert_json_success(result)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user