mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
test_auth_backends: Extract external_auth_backends.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
committed by
Tim Abbott
parent
d3f976a0a3
commit
51df4031ac
@@ -4730,6 +4730,12 @@ class ExternalMethodDictsTests(ZulipTestCase):
|
||||
),
|
||||
):
|
||||
external_auth_methods = get_external_method_dicts()
|
||||
external_auth_backends: List[Type[ExternalAuthMethod]] = [
|
||||
ZulipRemoteUserBackend,
|
||||
GitHubAuthBackend,
|
||||
AzureADAuthBackend,
|
||||
GoogleAuthBackend,
|
||||
]
|
||||
# First backends in the list should be SAML:
|
||||
self.assertIn("saml:", external_auth_methods[0]["name"])
|
||||
self.assertEqual(
|
||||
@@ -4737,12 +4743,7 @@ class ExternalMethodDictsTests(ZulipTestCase):
|
||||
[
|
||||
social_backend.name
|
||||
for social_backend in sorted(
|
||||
[
|
||||
ZulipRemoteUserBackend,
|
||||
GitHubAuthBackend,
|
||||
AzureADAuthBackend,
|
||||
GoogleAuthBackend,
|
||||
],
|
||||
external_auth_backends,
|
||||
key=lambda x: x.sort_order,
|
||||
reverse=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user