Use mock from the stdlib. (#9772)

This commit is contained in:
Patrick Cloke 2021-04-09 13:44:38 -04:00 committed by GitHub
parent f946450184
commit 0b3112123d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
82 changed files with 86 additions and 126 deletions

View file

@ -14,8 +14,7 @@
# limitations under the License.
from collections import Counter
from mock import Mock
from unittest.mock import Mock
import synapse.api.errors
import synapse.handlers.admin

View file

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from mock import Mock
from unittest.mock import Mock
from twisted.internet import defer

View file

@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from mock import Mock
from unittest.mock import Mock
import pymacaroons

View file

@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from mock import Mock
from unittest.mock import Mock
from synapse.handlers.cas_handler import CasResponse

View file

@ -14,7 +14,7 @@
# limitations under the License.
from mock import Mock
from unittest.mock import Mock
import synapse
import synapse.api.errors

View file

@ -14,7 +14,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
from signedjson import key as key, sign as sign

View file

@ -16,8 +16,7 @@
# limitations under the License.
import copy
import mock
from unittest import mock
from synapse.api.errors import SynapseError

View file

@ -14,10 +14,9 @@
# limitations under the License.
import json
import os
from unittest.mock import ANY, Mock, patch
from urllib.parse import parse_qs, urlparse
from mock import ANY, Mock, patch
import pymacaroons
from synapse.handlers.sso import MappingException

View file

@ -16,8 +16,7 @@
"""Tests for the password_auth_provider interface"""
from typing import Any, Type, Union
from mock import Mock
from unittest.mock import Mock
from twisted.internet import defer

View file

@ -14,7 +14,7 @@
# limitations under the License.
from mock import Mock, call
from unittest.mock import Mock, call
from signedjson.key import generate_signing_key

View file

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from mock import Mock
from unittest.mock import Mock
import synapse.types
from synapse.api.errors import AuthError, SynapseError

View file

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from mock import Mock
from unittest.mock import Mock
from synapse.api.auth import Auth
from synapse.api.constants import UserTypes

View file

@ -13,8 +13,7 @@
# limitations under the License.
from typing import Optional
from mock import Mock
from unittest.mock import Mock
import attr

View file

@ -16,8 +16,7 @@
import json
from typing import Dict
from mock import ANY, Mock, call
from unittest.mock import ANY, Mock, call
from twisted.internet import defer
from twisted.web.resource import Resource

View file

@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from mock import Mock
from unittest.mock import Mock
from twisted.internet import defer