From 7d007f7286d4dcb061845e291795fc5781011d3f Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Tue, 26 Oct 2021 12:36:27 -0500 Subject: [PATCH] Use unittest.mock Signed-off-by: Major Hayden --- tests/asyncio/future/test_async_future.py | 2 +- tests/asyncio/gapic/test_method_async.py | 2 +- tests/asyncio/operations_v1/test_operations_async_client.py | 2 +- tests/asyncio/test_grpc_helpers_async.py | 2 +- tests/asyncio/test_operation_async.py | 2 +- tests/asyncio/test_page_iterator_async.py | 2 +- tests/asyncio/test_retry_async.py | 2 +- tests/unit/future/test__helpers.py | 2 +- tests/unit/future/test_polling.py | 2 +- tests/unit/gapic/test_method.py | 2 +- tests/unit/test_bidi.py | 2 +- tests/unit/test_exceptions.py | 2 +- tests/unit/test_grpc_helpers.py | 2 +- tests/unit/test_operation.py | 2 +- tests/unit/test_page_iterator.py | 2 +- tests/unit/test_path_template.py | 2 +- tests/unit/test_retry.py | 2 +- tests/unit/test_timeout.py | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/asyncio/future/test_async_future.py b/tests/asyncio/future/test_async_future.py index 1e9ae33..1aaf132 100644 --- a/tests/asyncio/future/test_async_future.py +++ b/tests/asyncio/future/test_async_future.py @@ -14,7 +14,7 @@ import asyncio -import mock +from unittest import mock import pytest from google.api_core import exceptions diff --git a/tests/asyncio/gapic/test_method_async.py b/tests/asyncio/gapic/test_method_async.py index 1410747..7990e46 100644 --- a/tests/asyncio/gapic/test_method_async.py +++ b/tests/asyncio/gapic/test_method_async.py @@ -14,7 +14,7 @@ import datetime -import mock +from unittest import mock import pytest try: diff --git a/tests/asyncio/operations_v1/test_operations_async_client.py b/tests/asyncio/operations_v1/test_operations_async_client.py index 47c3b4b..67fc941 100644 --- a/tests/asyncio/operations_v1/test_operations_async_client.py +++ b/tests/asyncio/operations_v1/test_operations_async_client.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock import pytest try: diff --git a/tests/asyncio/test_grpc_helpers_async.py b/tests/asyncio/test_grpc_helpers_async.py index 3681a40..cc1a5a4 100644 --- a/tests/asyncio/test_grpc_helpers_async.py +++ b/tests/asyncio/test_grpc_helpers_async.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock import pytest # noqa: I202 try: diff --git a/tests/asyncio/test_operation_async.py b/tests/asyncio/test_operation_async.py index 886b1c8..68e6919 100644 --- a/tests/asyncio/test_operation_async.py +++ b/tests/asyncio/test_operation_async.py @@ -13,7 +13,7 @@ # limitations under the License. -import mock +from unittest import mock import pytest try: diff --git a/tests/asyncio/test_page_iterator_async.py b/tests/asyncio/test_page_iterator_async.py index 75f9e1c..c3f5d55 100644 --- a/tests/asyncio/test_page_iterator_async.py +++ b/tests/asyncio/test_page_iterator_async.py @@ -14,7 +14,7 @@ import inspect -import mock +from unittest import mock import pytest from google.api_core import page_iterator_async diff --git a/tests/asyncio/test_retry_async.py b/tests/asyncio/test_retry_async.py index 9e51044..27309cb 100644 --- a/tests/asyncio/test_retry_async.py +++ b/tests/asyncio/test_retry_async.py @@ -15,7 +15,7 @@ import datetime import re -import mock +from unittest import mock import pytest from google.api_core import exceptions diff --git a/tests/unit/future/test__helpers.py b/tests/unit/future/test__helpers.py index 98afc59..a37efdd 100644 --- a/tests/unit/future/test__helpers.py +++ b/tests/unit/future/test__helpers.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock from google.api_core.future import _helpers diff --git a/tests/unit/future/test_polling.py b/tests/unit/future/test_polling.py index 2381d03..79f19db 100644 --- a/tests/unit/future/test_polling.py +++ b/tests/unit/future/test_polling.py @@ -16,7 +16,7 @@ import concurrent.futures import threading import time -import mock +from unittest import mock import pytest from google.api_core import exceptions, retry diff --git a/tests/unit/gapic/test_method.py b/tests/unit/gapic/test_method.py index 9778d23..28323da 100644 --- a/tests/unit/gapic/test_method.py +++ b/tests/unit/gapic/test_method.py @@ -14,7 +14,7 @@ import datetime -import mock +from unittest import mock import pytest try: diff --git a/tests/unit/test_bidi.py b/tests/unit/test_bidi.py index 7fb1620..896f653 100644 --- a/tests/unit/test_bidi.py +++ b/tests/unit/test_bidi.py @@ -17,7 +17,7 @@ import logging import queue import threading -import mock +from unittest import mock import pytest try: diff --git a/tests/unit/test_exceptions.py b/tests/unit/test_exceptions.py index f6345fe..fb94097 100644 --- a/tests/unit/test_exceptions.py +++ b/tests/unit/test_exceptions.py @@ -15,7 +15,7 @@ import http.client import json -import mock +from unittest import mock import pytest import requests diff --git a/tests/unit/test_grpc_helpers.py b/tests/unit/test_grpc_helpers.py index ca969e4..95b1a24 100644 --- a/tests/unit/test_grpc_helpers.py +++ b/tests/unit/test_grpc_helpers.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import mock +from unittest import mock import pytest try: diff --git a/tests/unit/test_operation.py b/tests/unit/test_operation.py index bafff8b..68418cd 100644 --- a/tests/unit/test_operation.py +++ b/tests/unit/test_operation.py @@ -13,7 +13,7 @@ # limitations under the License. -import mock +from unittest import mock import pytest try: diff --git a/tests/unit/test_page_iterator.py b/tests/unit/test_page_iterator.py index a44e998..56be26f 100644 --- a/tests/unit/test_page_iterator.py +++ b/tests/unit/test_page_iterator.py @@ -15,7 +15,7 @@ import math import types -import mock +from unittest import mock import pytest from google.api_core import page_iterator diff --git a/tests/unit/test_path_template.py b/tests/unit/test_path_template.py index 2c5216e..a72f25f 100644 --- a/tests/unit/test_path_template.py +++ b/tests/unit/test_path_template.py @@ -14,7 +14,7 @@ from __future__ import unicode_literals -import mock +from unittest import mock import pytest from google.api_core import path_template diff --git a/tests/unit/test_retry.py b/tests/unit/test_retry.py index 199ca55..db985e5 100644 --- a/tests/unit/test_retry.py +++ b/tests/unit/test_retry.py @@ -16,7 +16,7 @@ import datetime import itertools import re -import mock +from unittest import mock import pytest import requests.exceptions diff --git a/tests/unit/test_timeout.py b/tests/unit/test_timeout.py index 30d624e..c13e499 100644 --- a/tests/unit/test_timeout.py +++ b/tests/unit/test_timeout.py @@ -15,7 +15,7 @@ import datetime import itertools -import mock +from unittest import mock from google.api_core import timeout -- 2.31.1