Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion awscli/testutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from ruamel.yaml import YAML

try:
import mock
from unittest import mock
except ImportError as e:
# In the off chance something imports this module
# that's not suppose to, we should not stop the CLI
Expand Down
1 change: 0 additions & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
jsonschema==4.7.2
mock==1.3.0
pytest==7.2.0
coverage==7.0.1
pytest-cov==4.0.0
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/autoprompt/test_autoprompt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import mock
from unittest import mock
import os

import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/csm/test_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import socket
import threading

import mock
from unittest import mock
import pytest

from tests import temporary_file
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_apigateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock

from tests import BaseSessionTest, ClientHTTPStubber

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_cloudsearchdomain.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock

from tests import BaseSessionTest, ClientHTTPStubber

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_cognito_idp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock
import pytest

from tests import create_session, ClientHTTPStubber
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import os
import math
import time
import mock
from unittest import mock
import tempfile
import shutil
from datetime import datetime, timedelta
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_docdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock
from contextlib import contextmanager

import botocore.session
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import datetime
import mock
from unittest import mock

from tests import unittest, ClientHTTPStubber, BaseSessionTest
from botocore.compat import parse_qs, urlparse
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_history.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from contextlib import contextmanager

import mock
from unittest import mock

from tests import BaseSessionTest, ClientHTTPStubber
from botocore.history import BaseHistoryHandler
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_lex.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock
from datetime import datetime

from tests import BaseSessionTest, ClientHTTPStubber
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_machinelearning.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock

from tests import BaseSessionTest, ClientHTTPStubber

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_neptune.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock
from contextlib import contextmanager

import botocore.session
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_public_apis.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# language governing permissions and limitations under the License.
from collections import defaultdict

import mock
from unittest import mock
import pytest

from tests import ClientHTTPStubber
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock
import pytest

from botocore.client import ClientEndpointBridge
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# language governing permissions and limitations under the License.
from tests import unittest, temporary_file

import mock
from unittest import mock

import botocore.session
from botocore.exceptions import ProfileNotFound
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_six_threading.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Regression test for six issue #98 (https://github.com/benjaminp/six/issues/98)
"""
from mock import patch
from unittest.mock import patch
import sys
import threading
import time
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/botocore/test_sts.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from datetime import datetime
import re

import mock
from unittest import mock

from tests import BaseSessionTest
from tests import temporary_file
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cloudfront/test_create_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock

from awscli.testutils import BaseAWSCommandParamsTest

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cloudfront/test_create_invalidation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock

from awscli.testutils import BaseAWSCommandParamsTest

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cloudfront/test_sign.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock
from botocore.compat import urlparse, parse_qs

from awscli.testutils import FileCreator
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cloudfront/test_update_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock

from awscli.testutils import BaseAWSCommandParamsTest

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/cloudtrail/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import gzip
from mock import Mock, patch
from unittest.mock import Mock, patch

from awscli.compat import six
from botocore.exceptions import ClientError
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/configservice/test_subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock

from awscli.testutils import BaseAWSCommandParamsTest
from awscli.customizations.configservice.subscribe import S3BucketHelper
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/dependencies/test_colorama.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
from contextlib import contextmanager

from mock import Mock, patch
from unittest.mock import Mock, patch

from awscli.testutils import unittest, skip_if_windows
from awscli.testutils import capture_output
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/docs/test_help_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

from awscli.compat import six
from awscli.alias import AliasLoader
import mock
from unittest import mock


class TestHelpOutput(BaseAWSHelpOutputTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/ec2/test_bundle_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import base64
import datetime

import mock
from unittest import mock
from six.moves import cStringIO

import awscli.customizations.ec2.bundleinstance
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/ecs/test_execute_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock
import errno
import json

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/eks/test_kubeconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import os
import shutil
import tempfile
import mock
from unittest import mock

from botocore.compat import OrderedDict

Expand Down
4 changes: 2 additions & 2 deletions tests/functional/eks/test_update_kubeconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import sys
import tempfile

import mock
from unittest import mock
from botocore.session import get_session
from mock import patch, Mock
from unittest.mock import patch, Mock

from awscli.customizations.eks.exceptions import EKSClusterError
from awscli.customizations.eks.kubeconfig import (
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/lightsail/test_push_container_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

import mock
from unittest import mock
import errno
import json
import awscli
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/rds/test_generate_db_auth_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import datetime
import mock
from unittest import mock

from dateutil.tz import tzutc
from botocore.compat import urlparse, parse_qs
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/s3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock
import os

from awscrt.s3 import S3Request
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/s3/test_cp_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock
import os

from awscrt.s3 import S3RequestType, S3RequestTlsMode
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/s3/test_sync_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
from mock import patch
from unittest.mock import patch
import os

from awscrt.s3 import S3RequestType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


import os
from mock import mock
import unittest.mock as mock

from awscli.customizations.servicecatalog.utils \
import get_s3_path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


import os
from mock import mock
import unittest.mock as mock

from awscli.customizations.servicecatalog.utils \
import get_s3_path
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/ses/test_send_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from awscli.compat import six
from six.moves import cStringIO
import mock
from unittest import mock


class TestSendEmail(BaseAWSCommandParamsTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/ssm/test_start_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock
import errno
import json

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_clidriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import mock
from unittest import mock
import os
import re
import shutil
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_paramfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import logging
import os

from mock import patch, ANY
from unittest.mock import patch, ANY

from awscli.testutils import FileCreator, BaseAWSCommandParamsTest
from awscli.clidriver import create_clidriver
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/botocore/test_client_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import socket
import contextlib
import threading
import mock
from unittest import mock
from tests import unittest
from contextlib import contextmanager

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/botocore/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import os
import mock
from unittest import mock
import tempfile
import shutil
import json
Expand Down
Loading