Skip to content

Commit

Permalink
fix isort errors
Browse files Browse the repository at this point in the history
  • Loading branch information
balamurugana committed Apr 30, 2020
1 parent 39a4294 commit fd87e21
Show file tree
Hide file tree
Showing 36 changed files with 68 additions and 37 deletions.
3 changes: 1 addition & 2 deletions minio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@
from datetime import datetime, timedelta
from threading import Thread

import certifi
import dateutil.parser
# Dependencies
import urllib3

import certifi

# Internal imports
from . import __title__, __version__
from .compat import basestring, queryencode, range, urlsplit
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
from sys import exit
from threading import Thread

import certifi
import urllib3

import certifi
from minio import CopyConditions, Minio, PostPolicy
from minio.error import (APINotImplemented, BucketAlreadyExists,
BucketAlreadyOwnedByYou, InvalidBucketError,
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/bucket_exist_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

from unittest import TestCase

from nose.tools import eq_, raises

import mock
from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
from minio.error import InvalidBucketError, ResponseError
from nose.tools import eq_, raises

from .minio_mocks import MockConnection, MockResponse

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/chain_provider_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
import os
from unittest import TestCase

from nose.tools import eq_

from minio.credentials.chain import Chain
from minio.credentials.env_aws import EnvAWS
from minio.credentials.env_minio import EnvMinio
from nose.tools import eq_


class ChainProviderTest(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/copy_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

from unittest import TestCase

from nose.tools import raises

from minio import Minio
from minio.copy_conditions import CopyConditions
from minio.error import InvalidBucketError
from nose.tools import raises


class CopyObjectTest(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/credentials_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

from unittest import TestCase

from nose.tools import eq_

from minio.credentials.credentials import Credentials, Value
from minio.credentials.file_minio_client import FileMinioClient
from nose.tools import eq_


class CredentialsTest(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/env_aws_provider_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
import os
from unittest import TestCase

from nose.tools import eq_

from minio.credentials.credentials import Value
from minio.credentials.env_aws import EnvAWS
from nose.tools import eq_


class EnvAWSTest(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/env_minio_provider_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
import os
from unittest import TestCase

from nose.tools import eq_

from minio.credentials.credentials import Value
from minio.credentials.env_minio import EnvMinio
from nose.tools import eq_


class EnvMinioTest(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/file_aws_credentials_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
import os
from unittest import TestCase

from nose.tools import eq_

from minio.credentials.credentials import Value
from minio.credentials.file_aws_credentials import FileAWSCredentials
from nose.tools import eq_


class FileAWSCredentialsTest(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/file_minio_client_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
import os
from unittest import TestCase

from nose.tools import eq_

from minio.credentials.credentials import Value
from minio.credentials.file_minio_client import FileMinioClient
from nose.tools import eq_


class FileMinioClientTest(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/generate_xml_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@

from unittest import TestCase

from nose.tools import eq_

from minio.definitions import UploadPart
from minio.select.options import (CSVInput, CSVOutput, InputSerialization,
OutputSerialization, RequestProgress,
SelectObjectOptions)
from minio.xml_marshal import (xml_marshal_bucket_constraint,
xml_marshal_complete_multipart_upload,
xml_marshal_select)
from nose.tools import eq_


class GenerateRequestTest(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/get_bucket_policy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@

from unittest import TestCase

from nose.tools import eq_, raises

import mock
from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
from minio.error import NoSuchBucket
from nose.tools import eq_, raises
from tests.unit.minio_mocks import MockConnection, MockResponse


Expand Down
3 changes: 2 additions & 1 deletion tests/unit/get_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

from unittest import TestCase

from nose.tools import raises

import mock
from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
from minio.error import ResponseError
from nose.tools import raises

from .helpers import generate_error
from .minio_mocks import MockConnection, MockResponse
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/get_s3_endpoint_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

from unittest import TestCase

from minio.helpers import get_s3_endpoint, is_valid_endpoint
from nose.tools import eq_

from minio.helpers import get_s3_endpoint, is_valid_endpoint


class GetS3Endpoint(TestCase):
def test_get_s3_endpoint(self):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/header_value_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

from unittest import TestCase

from nose.tools import eq_

from minio.helpers import (amzprefix_user_metadata, is_amz_header,
is_storageclass_header, is_supported_header)
from nose.tools import eq_


class HeaderTests(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/iam_aws_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
import json
from unittest import TestCase

from nose.tools import eq_

import mock
from minio.credentials.aws_iam import IamEc2MetaData
from nose.tools import eq_


class CredListResponse(object):
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 @@ -18,11 +18,11 @@
from unittest import TestCase

import pytz
from nose.tools import eq_

import mock
from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
from nose.tools import eq_

from .minio_mocks import MockConnection, MockResponse

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/list_incomplete_uploads_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

from unittest import TestCase

from nose.tools import eq_

import mock
from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
from nose.tools import eq_

from .minio_mocks import MockConnection, MockResponse

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/list_objects_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

from unittest import TestCase

from nose.tools import eq_, timed

import mock
from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
from nose.tools import eq_, timed

from .minio_mocks import MockConnection, MockResponse

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/list_objects_v2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

from unittest import TestCase

from nose.tools import eq_, timed

import mock
from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
from nose.tools import eq_, timed

from .minio_mocks import MockConnection, MockResponse

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/list_uploaded_parts_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

from unittest import TestCase

from nose.tools import eq_

import mock
from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
from nose.tools import eq_

from .minio_mocks import MockConnection, MockResponse

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/make_bucket_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

from unittest import TestCase

from nose.tools import raises

import mock
from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
from minio.error import InvalidBucketError, ResponseError
from nose.tools import raises

from .helpers import generate_error
from .minio_mocks import MockConnection, MockResponse
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/minio_mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from nose.tools import eq_

from minio.compat import _is_py3
from minio.fold_case_dict import FoldCaseDict
from nose.tools import eq_

if _is_py3:
import http.client as httplib
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/minio_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@

from unittest import TestCase

from nose.tools import eq_, raises

from minio import Minio
from minio import __version__ as minio_version
from minio.api import _DEFAULT_USER_AGENT
from minio.error import InvalidBucketError, InvalidEndpointError
from minio.helpers import (get_s3_region_from_endpoint, get_target_url,
is_valid_bucket_name)
from nose.tools import eq_, raises


class ValidBucketName(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/optimal_part_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@

from unittest import TestCase

from nose.tools import eq_, raises

from minio.error import InvalidArgumentError
from minio.helpers import (MAX_MULTIPART_OBJECT_SIZE, MIN_PART_SIZE,
optimal_part_info)
from nose.tools import eq_, raises


class TraceTest(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/presigned_get_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
from datetime import timedelta
from unittest import TestCase

from nose.tools import raises

import mock
from minio import Minio
from minio.error import InvalidArgumentError
from nose.tools import raises


class PresignedGetObjectTest(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/presigned_put_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
from datetime import timedelta
from unittest import TestCase

from nose.tools import raises

from minio import Minio
from minio.error import InvalidArgumentError
from nose.tools import raises


class PresignedPutObjectTest(TestCase):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/put_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

from unittest import TestCase

from minio import Minio
from nose.tools import raises

from minio import Minio


class PutObjectTest(TestCase):
@raises(TypeError)
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/remove_bucket_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

from unittest import TestCase

from nose.tools import raises

import mock
from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
from minio.error import InvalidBucketError
from nose.tools import raises

from .minio_mocks import MockConnection, MockResponse

Expand Down
3 changes: 2 additions & 1 deletion tests/unit/remove_object_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

from unittest import TestCase

from nose.tools import raises

import mock
from minio import Minio
from minio.api import _DEFAULT_USER_AGENT
from minio.error import InvalidBucketError
from nose.tools import raises

from .minio_mocks import MockConnection, MockResponse

Expand Down
Loading

0 comments on commit fd87e21

Please sign in to comment.