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:
Rhea Parekh
2018-07-28 03:17:33 +05:30
committed by Tim Abbott
parent 499a70b01e
commit 6e7905651f
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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