mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	tests: Use do_change_user_role in lint rules and test docs.
This commit changes test docs and lint rules to use do_change_user_role instead of do_change_is_admin and do_change_is_guest.
This commit is contained in:
		@@ -106,7 +106,7 @@ influence tests results.)
 | 
			
		||||
Here are some example action methods that tests may use for data setup:
 | 
			
		||||
 | 
			
		||||
- check_send_message
 | 
			
		||||
- do_change_is_admin
 | 
			
		||||
- do_change_user_role
 | 
			
		||||
- do_create_user
 | 
			
		||||
- do_make_stream_private
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -457,14 +457,14 @@ python_rules = RuleList(
 | 
			
		||||
         'description': 'Raise CommandError to exit with failure in management commands',
 | 
			
		||||
         },
 | 
			
		||||
        {'pattern': '.is_realm_admin =',
 | 
			
		||||
         'description': 'Use do_change_is_admin function rather than setting UserProfile\'s is_realm_admin attribute directly.',
 | 
			
		||||
         'description': 'Use do_change_user_role function rather than setting UserProfile\'s is_realm_admin attribute directly.',
 | 
			
		||||
         'exclude': {
 | 
			
		||||
             'zerver/migrations/0248_userprofile_role_start.py',
 | 
			
		||||
             'zerver/tests/test_users.py',
 | 
			
		||||
         },
 | 
			
		||||
         },
 | 
			
		||||
        {'pattern': '.is_guest =',
 | 
			
		||||
         'description': 'Use do_change_is_guest function rather than setting UserProfile\'s is_guest attribute directly.',
 | 
			
		||||
         'description': 'Use do_change_user_role function rather than setting UserProfile\'s is_guest attribute directly.',
 | 
			
		||||
         'exclude': {
 | 
			
		||||
             'zerver/migrations/0248_userprofile_role_start.py',
 | 
			
		||||
             'zerver/tests/test_users.py',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user