tests: Improve authentication_methods schema.

This also removes the last use of the "loose"
check_dict() validator in the events tests.
This commit is contained in:
Steve Howell 2020-06-25 19:59:46 +00:00 committed by Tim Abbott
parent 5faea773b1
commit a46c28eea2

View File

@ -131,7 +131,6 @@ from zerver.lib.users import get_api_key
from zerver.lib.validator import (
Validator,
check_bool,
check_dict,
check_dict_only,
check_float,
check_int,
@ -1651,7 +1650,13 @@ class EventsRegisterTest(ZulipTestCase):
('op', equals('update_dict')),
('property', equals('default')),
('data', check_dict_only([
('authentication_methods', check_dict([])),
('authentication_methods', check_dict_only([
('Google', check_bool),
('Dev', check_bool),
('LDAP', check_bool),
('GitHub', check_bool),
('Email', check_bool),
])),
])),
])