From a46c28eea2d4caf08679abe2c1efa855833ee5a0 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 25 Jun 2020 19:59:46 +0000 Subject: [PATCH] tests: Improve authentication_methods schema. This also removes the last use of the "loose" check_dict() validator in the events tests. --- zerver/tests/test_events.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py index 394853be31..1178d21733 100644 --- a/zerver/tests/test_events.py +++ b/zerver/tests/test_events.py @@ -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), + ])), ])), ])