mirror of https://github.com/zulip/zulip.git
tests: Refine external_authentication_methods.
This removes our last use of `check_dict` in `zerver/tests`, except for `test_decorators.py`, which is testing the function itself.
This commit is contained in:
parent
a46c28eea2
commit
7c2be24cf8
|
@ -70,10 +70,10 @@ from zerver.lib.utils import generate_random_token
|
|||
from zerver.lib.validator import (
|
||||
Validator,
|
||||
check_bool,
|
||||
check_dict,
|
||||
check_dict_only,
|
||||
check_int,
|
||||
check_list,
|
||||
check_none_or,
|
||||
check_string,
|
||||
validate_login_email,
|
||||
)
|
||||
|
@ -3311,7 +3311,16 @@ class FetchAuthBackends(ZulipTestCase):
|
|||
self.assert_json_success(result)
|
||||
checker = check_dict_only([
|
||||
('authentication_methods', check_dict_only(authentication_methods_list)),
|
||||
('external_authentication_methods', check_list(check_dict(), length=len(external_auth_methods))),
|
||||
('external_authentication_methods', check_list(
|
||||
check_dict_only([
|
||||
('display_icon', check_none_or(check_string)),
|
||||
('display_name', check_string),
|
||||
('login_url', check_string),
|
||||
('name', check_string),
|
||||
('signup_url', check_string),
|
||||
]),
|
||||
length=len(external_auth_methods)
|
||||
)),
|
||||
('email_auth_enabled', check_bool),
|
||||
('is_incompatible', check_bool),
|
||||
('require_email_format_usernames', check_bool),
|
||||
|
|
Loading…
Reference in New Issue