Skip to content

Commit b1ea7fa

Browse files
committed
chore: remove use of old external mock
1 parent aff6f55 commit b1ea7fa

27 files changed

+26
-35
lines changed

google/api_core/exceptions.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
on :mod:`google.api_core`, including both HTTP and gRPC clients.
1919
"""
2020

21-
from __future__ import absolute_import
22-
from __future__ import unicode_literals
23-
2421
import http.client
2522
from typing import Dict
2623
from typing import Union

google/api_core/path_template.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
.. _resource names: https://cloud.google.com/apis/design/resource_names
2424
"""
2525

26-
from __future__ import unicode_literals
27-
2826
from collections import deque
2927
import copy
3028
import functools

google/api_core/timeout.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ def is_thing_ready(timeout=None):
5252
matches ``api_method(request, timeout=None, retry=None)``.
5353
"""
5454

55-
from __future__ import unicode_literals
56-
5755
import datetime
5856
import functools
5957

noxfile.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from __future__ import absolute_import
1615
import os
1716
import pathlib
1817
import re
@@ -119,7 +118,6 @@ def default(session, install_grpc=True, prerelease=False):
119118

120119
session.install(
121120
"dataclasses",
122-
"mock",
123121
"pytest",
124122
"pytest-cov",
125123
"pytest-xdist",
@@ -249,7 +247,6 @@ def mypy(session):
249247
"types-setuptools",
250248
"types-requests",
251249
"types-protobuf",
252-
"types-mock",
253250
"types-dataclasses",
254251
)
255252
session.run("mypy", "google", "tests")

tests/asyncio/future/test_async_future.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# limitations under the License.
1414

1515
import asyncio
16+
from unittest import mock
1617

17-
import mock
1818
import pytest
1919

2020
from google.api_core import exceptions

tests/asyncio/gapic/test_method_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# limitations under the License.
1414

1515
import datetime
16+
from unittest import mock
1617

17-
import mock
1818
import pytest
1919

2020
try:

tests/asyncio/operations_v1/test_operations_async_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import mock
15+
from unittest import mock
16+
1617
import pytest
1718

1819
try:

tests/asyncio/retry/test_retry_streaming_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import datetime
1616
import re
1717
import asyncio
18+
from unittest import mock
1819

19-
import mock
2020
import pytest
2121

2222
from google.api_core import exceptions

tests/asyncio/retry/test_retry_unary_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
import datetime
1616
import re
17+
from unittest import mock
1718

18-
import mock
1919
import pytest
2020

2121
from google.api_core import exceptions

tests/asyncio/test_grpc_helpers_async.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import mock
15+
from unittest import mock
16+
1617
import pytest # noqa: I202
1718

1819
try:

0 commit comments

Comments
 (0)