python: Reformat with Ruff formatter.

https://docs.astral.sh/ruff/formatter/

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2023-12-05 09:45:07 -08:00
committed by Tim Abbott
parent c85b2edbd4
commit 570f3dd447
68 changed files with 137 additions and 184 deletions

View File

@@ -7256,9 +7256,7 @@ class LDAPBackendTest(ZulipTestCase):
"zproject.backends.ZulipLDAPAuthBackend.get_or_build_user", side_effect=error
), mock.patch("django_auth_ldap.backend._LDAPUser._authenticate_user_dn"), self.assertLogs(
"django_auth_ldap", "WARNING"
) as warn_log, self.assertLogs(
"django.request", level="ERROR"
):
) as warn_log, self.assertLogs("django.request", level="ERROR"):
response = self.client_post("/login/", data)
self.assertEqual(response.status_code, 500)
self.assert_in_response("Configuration error", response)