mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	mypy: Fix type errors relate to 'mock'.
1. The type of a mock object should be 'Any'. 2. 'mock' is being imported in the wrong manner.
This commit is contained in:
		@@ -487,7 +487,7 @@ body:
 | 
			
		||||
                               status_code=401)
 | 
			
		||||
 | 
			
		||||
class RateLimitTestCase(TestCase):
 | 
			
		||||
    def errors_disallowed(self) -> mock:
 | 
			
		||||
    def errors_disallowed(self) -> Any:
 | 
			
		||||
        # Due to what is probably a hack in rate_limit(),
 | 
			
		||||
        # some tests will give a false positive (or succeed
 | 
			
		||||
        # for the wrong reason), unless we complain
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ from datetime import timedelta
 | 
			
		||||
from django.http import HttpResponse
 | 
			
		||||
from django.test import override_settings
 | 
			
		||||
from django.utils.timezone import now as timezone_now
 | 
			
		||||
from mock import mock
 | 
			
		||||
import mock
 | 
			
		||||
 | 
			
		||||
from typing import Any, Dict
 | 
			
		||||
from zerver.lib.actions import do_deactivate_user
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user