mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
tests: Use a HttpRequest object in assert_login_failure.
Our convention is to always have authenticate() called with a request object. We need to be consistent with that in tests too, to avoid test failures resulting from breaking that assumption. We modify assert_login_failure to call client.login() in the same way as the other similar helpers - with a properly initialized HttpRequest instance.
This commit is contained in:
committed by
Tim Abbott
parent
e7c62c4190
commit
5d54cd1041
@@ -574,8 +574,11 @@ Output:
|
||||
|
||||
def assert_login_failure(self, email: str, password: str) -> None:
|
||||
realm = get_realm("zulip")
|
||||
request = HttpRequest()
|
||||
request.session = self.client.session
|
||||
self.assertFalse(
|
||||
self.client.login(
|
||||
request=request,
|
||||
username=email,
|
||||
password=password,
|
||||
realm=realm,
|
||||
|
||||
Reference in New Issue
Block a user