From 8459c208f11e64b871ed502c9ce56befa2a2ed97 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Fri, 4 Mar 2022 07:02:27 -0600 Subject: [PATCH] Use unittest.mock --- 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/operations_v1/test_operations_rest_client.py | 2 +- tests/unit/test_bidi.py | 2 +- tests/unit/test_exceptions.py | 2 +- tests/unit/test_extended_operation.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 +- 20 files changed, 20 insertions(+), 20 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 26ad7ce..662d956 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 873caaf..1f57470 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/operations_v1/test_operations_rest_client.py b/tests/unit/operations_v1/test_operations_rest_client.py index dddf6b7..f40d780 100644 --- a/tests/unit/operations_v1/test_operations_rest_client.py +++ b/tests/unit/operations_v1/test_operations_rest_client.py @@ -15,7 +15,7 @@ # import os -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 4169ad4..099e423 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_extended_operation.py b/tests/unit/test_extended_operation.py index 7fcebed..c31640a 100644 --- a/tests/unit/test_extended_operation.py +++ b/tests/unit/test_extended_operation.py @@ -16,7 +16,7 @@ import dataclasses import enum import typing -import mock +from unittest import mock import pytest from google.api_core import exceptions 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 22e23bc..8ffee10 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 74c5d77..b7462fb 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.35.1