Skip to content

Commit 4a46b42

Browse files
committed
remove use of old external "mock" module
1 parent ca94ead commit 4a46b42

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+53
-53
lines changed

noxfile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def mypy(session):
7979
"types-pyOpenSSL",
8080
"types-requests",
8181
"types-setuptools",
82-
"types-mock",
8382
)
8483
session.run("mypy", "-p", "google", "-p", "tests", "-p", "tests_async")
8584

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
"grpcio",
5757
"flask",
5858
"freezegun",
59-
"mock",
6059
# TODO(https://github.com/googleapis/google-auth-library-python/issues/1736): Remove `oauth2client` from testing requirements once an extra is added for `oauth2client` dependency.
6160
"oauth2client",
6261
*pyjwt_extra_require,

system_tests/system_tests_sync/test_external_accounts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
from http.server import HTTPServer
4949
from google.oauth2 import service_account
5050
import pytest
51-
from mock import patch
51+
from unittest.mock import patch
5252

5353
# Populate values from the output of scripts/setup_external_accounts.sh.
5454
_AUDIENCE_OIDC = "//iam.googleapis.com/projects/79992041559/locations/global/workloadIdentityPools/pool-73wslmxn/providers/oidc-73wslmxn"

system_tests/system_tests_sync/test_mtls_http.py

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

1515
import json
16-
import mock
1716
import os
1817
import time
1918
from os import path
19+
from unittest import mock
2020

2121

2222
import google.auth

tests/compute_engine/test__metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import importlib
1818
import json
1919
import os
20+
from unittest import mock
2021

21-
import mock
2222
import pytest # type: ignore
2323

2424
from google.auth import _helpers

tests/compute_engine/test_credentials.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
import base64
1515
import datetime
16+
from unittest import mock
1617

17-
import mock
1818
import pytest # type: ignore
1919
import responses # type: ignore
2020

tests/conftest.py

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

1515
import os
1616
import sys
17+
from unittest import mock
1718

18-
import mock
1919
import pytest # type: ignore
2020

2121

tests/crypt/test__python_rsa.py

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

19-
import mock
2020
from pyasn1_modules import pem # type: ignore
2121
import pytest # type: ignore
2222
import rsa # type: ignore

tests/oauth2/test__client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import json
1818
import os
1919
import urllib
20+
from unittest import mock
2021

21-
import mock
2222
import pytest # type: ignore
2323

2424
from google.auth import _helpers

tests/oauth2/test_challenges.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import base64
1818
import os
1919
import sys
20+
from unitest import mock
2021

21-
import mock
2222
import pytest # type: ignore
2323
import pyu2f # type: ignore
2424

0 commit comments

Comments
 (0)