Skip to content

Commit

Permalink
fix: Use unittest.mock
Browse files Browse the repository at this point in the history
The `mock` module is deprecated in recent Python versions.

Signed-off-by: Major Hayden <[email protected]>
  • Loading branch information
major committed May 23, 2022
1 parent c60556b commit 8938a52
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/system/requests/test_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import urllib.parse

import pytest # type: ignore
import mock
from unittest import mock

from google.resumable_media import common
from google import resumable_media
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/requests/test__helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import http.client

import mock
from unittest import mock
import pytest # type: ignore

import requests.exceptions
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/requests/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import http.client
import io

import mock
from unittest import mock
import pytest # type: ignore

from google.resumable_media import common
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/requests/test_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import io
import json

import mock
from unittest import mock

import google.resumable_media.requests.upload as upload_mod

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test__download.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import http.client
import io

import mock
from unittest import mock
import pytest # type: ignore

from google.resumable_media import _download
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test__helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import hashlib
import http.client

import mock
from unittest import mock
import pytest # type: ignore

from google.resumable_media import _helpers
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test__upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import io
import sys

import mock
from unittest import mock
import pytest # type: ignore

from google.resumable_media import _helpers
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 # type: ignore

from google.resumable_media import common
Expand Down

0 comments on commit 8938a52

Please sign in to comment.