tests: Don't fail silently on 500 on logins.

This commit is contained in:
Harshit Bansal 2019-01-29 19:32:49 +00:00 committed by Tim Abbott
parent 6777b94d41
commit 837483b026
1 changed files with 5 additions and 3 deletions

View File

@ -289,9 +289,11 @@ class ZulipTestCase(TestCase):
**kwargs: Any) -> HttpResponse:
if password is None:
password = initial_password(email)
return self.client_post('/accounts/login/',
{'username': email, 'password': password},
**kwargs)
result = self.client_post('/accounts/login/',
{'username': email, 'password': password},
**kwargs)
self.assertNotEqual(result.status_code, 500)
return result
def login(self, email: str, password: Optional[str]=None, fails: bool=False,
realm: Optional[Realm]=None) -> HttpResponse: