Skip to content

Commit

Permalink
use unittest.mock instead of mock (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgajdos authored Mar 30, 2022
1 parent 55bb3a3 commit e8b0d1b
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default: tests

getdeps:
@echo "Installing required dependencies"
@pip install --user --upgrade autopep8 certifi mock pytest pylint urllib3
@pip install --user --upgrade autopep8 certifi pytest pylint urllib3

check: getdeps
@echo "Running checks"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
package_dir={"minio": "minio"},
packages=["minio", "minio.credentials"],
install_requires=["certifi", "urllib3"],
tests_require=["mock"],
tests_require=[],
license="Apache License 2.0",
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/bucket_exist_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/credentials_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from datetime import datetime, timedelta
from unittest import TestCase

import mock
import unittest.mock as mock

from minio.credentials.credentials import Credentials
from minio.credentials.providers import (AWSConfigProvider, ChainedProvider,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/get_bucket_policy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import json
from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/get_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/list_buckets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from datetime import datetime, timezone
from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/list_objects_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import time
from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/list_objects_v1_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import time
from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/make_bucket_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/presigned_get_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from datetime import timedelta
from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/remove_bucket_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/remove_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/remove_objects_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import itertools
from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/stat_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from unittest import TestCase

import mock
import unittest.mock as mock

from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
Expand Down

0 comments on commit e8b0d1b

Please sign in to comment.