diff --git a/test/functional/__init__.py b/test/functional/__init__.py index 53a960891..ad0e71d6c 100644 --- a/test/functional/__init__.py +++ b/test/functional/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of @@ -10,3 +10,4 @@ # 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. +"""Dummy stub to make linters work better.""" diff --git a/test/functional/internal/__init__.py b/test/functional/internal/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/functional/internal/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/functional/internal/crypto/__init__.py b/test/functional/internal/crypto/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/functional/internal/crypto/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/functional/test_f_crypto.py b/test/functional/internal/crypto/test_crypto.py similarity index 100% rename from test/functional/test_f_crypto.py rename to test/functional/internal/crypto/test_crypto.py diff --git a/test/functional/test_f_crypto_iv.py b/test/functional/internal/crypto/test_iv.py similarity index 100% rename from test/functional/test_f_crypto_iv.py rename to test/functional/internal/crypto/test_iv.py diff --git a/test/functional/test_f_aws_encryption_sdk_client.py b/test/functional/test_client.py similarity index 100% rename from test/functional/test_f_aws_encryption_sdk_client.py rename to test/functional/test_client.py diff --git a/test/integration/__init__.py b/test/integration/__init__.py index 53a960891..ad0e71d6c 100644 --- a/test/integration/__init__.py +++ b/test/integration/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of @@ -10,3 +10,4 @@ # 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. +"""Dummy stub to make linters work better.""" diff --git a/test/integration/test_i_aws_encrytion_sdk_client.py b/test/integration/test_client.py similarity index 100% rename from test/integration/test_i_aws_encrytion_sdk_client.py rename to test/integration/test_client.py diff --git a/test/integration/test_i_thread_safety.py b/test/integration/test_thread_safety.py similarity index 100% rename from test/integration/test_i_thread_safety.py rename to test/integration/test_thread_safety.py diff --git a/test/unit/__init__.py b/test/unit/__init__.py index 53a960891..ad0e71d6c 100644 --- a/test/unit/__init__.py +++ b/test/unit/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of @@ -10,3 +10,4 @@ # 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/caches/__init__.py b/test/unit/caches/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/caches/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/test_caches_base.py b/test/unit/caches/test_base.py similarity index 100% rename from test/unit/test_caches_base.py rename to test/unit/caches/test_base.py diff --git a/test/unit/test_caches.py b/test/unit/caches/test_caches.py similarity index 100% rename from test/unit/test_caches.py rename to test/unit/caches/test_caches.py diff --git a/test/unit/test_caches_crypto_cache_entry.py b/test/unit/caches/test_crypto_cache_entry.py similarity index 100% rename from test/unit/test_caches_crypto_cache_entry.py rename to test/unit/caches/test_crypto_cache_entry.py diff --git a/test/unit/test_caches_local.py b/test/unit/caches/test_local.py similarity index 100% rename from test/unit/test_caches_local.py rename to test/unit/caches/test_local.py diff --git a/test/unit/test_caches_null.py b/test/unit/caches/test_null.py similarity index 100% rename from test/unit/test_caches_null.py rename to test/unit/caches/test_null.py diff --git a/test/unit/internal/__init__.py b/test/unit/internal/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/internal/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/internal/crypto/__init__.py b/test/unit/internal/crypto/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/internal/crypto/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/internal/crypto/authentication/__init__.py b/test/unit/internal/crypto/authentication/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/internal/crypto/authentication/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/test_crypto_prehashing_authenticator.py b/test/unit/internal/crypto/authentication/test_prehashing_authenticator.py similarity index 100% rename from test/unit/test_crypto_prehashing_authenticator.py rename to test/unit/internal/crypto/authentication/test_prehashing_authenticator.py diff --git a/test/unit/test_crypto_authentication_signer.py b/test/unit/internal/crypto/authentication/test_signer.py similarity index 99% rename from test/unit/test_crypto_authentication_signer.py rename to test/unit/internal/crypto/authentication/test_signer.py index eae064130..0a55b2e48 100644 --- a/test/unit/test_crypto_authentication_signer.py +++ b/test/unit/internal/crypto/authentication/test_signer.py @@ -19,7 +19,7 @@ from aws_encryption_sdk.internal.crypto.authentication import Signer from aws_encryption_sdk.internal.defaults import ALGORITHM -from .test_crypto import VALUES +from ..vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_crypto_authentication_verifier.py b/test/unit/internal/crypto/authentication/test_verifier.py similarity index 99% rename from test/unit/test_crypto_authentication_verifier.py rename to test/unit/internal/crypto/authentication/test_verifier.py index a55e8f517..e25fb78f3 100644 --- a/test/unit/test_crypto_authentication_verifier.py +++ b/test/unit/internal/crypto/authentication/test_verifier.py @@ -19,7 +19,7 @@ from aws_encryption_sdk.internal.crypto.authentication import Verifier from aws_encryption_sdk.internal.defaults import ALGORITHM -from .test_crypto import VALUES +from ..vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/internal/crypto/encryption/__init__.py b/test/unit/internal/crypto/encryption/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/internal/crypto/encryption/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/test_crypto_encryption_decryptor.py b/test/unit/internal/crypto/encryption/test_decryptor.py similarity index 100% rename from test/unit/test_crypto_encryption_decryptor.py rename to test/unit/internal/crypto/encryption/test_decryptor.py diff --git a/test/unit/test_crypto_encryption_encryptor.py b/test/unit/internal/crypto/encryption/test_encryptor.py similarity index 100% rename from test/unit/test_crypto_encryption_encryptor.py rename to test/unit/internal/crypto/encryption/test_encryptor.py diff --git a/test/unit/test_crypto_data_keys.py b/test/unit/internal/crypto/test_data_keys.py similarity index 100% rename from test/unit/test_crypto_data_keys.py rename to test/unit/internal/crypto/test_data_keys.py diff --git a/test/unit/test_crypto_elliptic_curve.py b/test/unit/internal/crypto/test_elliptic_curve.py similarity index 99% rename from test/unit/test_crypto_elliptic_curve.py rename to test/unit/internal/crypto/test_elliptic_curve.py index b030db5c2..16dcd2686 100644 --- a/test/unit/test_crypto_elliptic_curve.py +++ b/test/unit/internal/crypto/test_elliptic_curve.py @@ -17,7 +17,6 @@ from cryptography.hazmat.primitives.asymmetric import ec from cryptography.utils import InterfaceNotImplemented from mock import MagicMock, sentinel -from pytest_mock import mocker # noqa pylint: disable=unused-import import aws_encryption_sdk.internal.crypto.elliptic_curve from aws_encryption_sdk.exceptions import NotSupportedError @@ -31,7 +30,7 @@ generate_ecc_signing_key, ) -from .test_crypto import VALUES +from .vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_crypto_wrapping_keys.py b/test/unit/internal/crypto/test_wrapping_keys.py similarity index 99% rename from test/unit/test_crypto_wrapping_keys.py rename to test/unit/internal/crypto/test_wrapping_keys.py index cb7b4489a..2bdcb0983 100644 --- a/test/unit/test_crypto_wrapping_keys.py +++ b/test/unit/internal/crypto/test_wrapping_keys.py @@ -21,7 +21,7 @@ from aws_encryption_sdk.internal.crypto.wrapping_keys import WrappingKey from aws_encryption_sdk.internal.structures import EncryptedData -from .test_crypto import VALUES +from .vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_crypto.py b/test/unit/internal/crypto/vectors.py similarity index 100% rename from test/unit/test_crypto.py rename to test/unit/internal/crypto/vectors.py diff --git a/test/unit/internal/formatting/__init__.py b/test/unit/internal/formatting/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/internal/formatting/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/test_deserialize.py b/test/unit/internal/formatting/test_deserialize.py similarity index 99% rename from test/unit/test_deserialize.py rename to test/unit/internal/formatting/test_deserialize.py index 8a96ea4ca..d19093320 100644 --- a/test/unit/test_deserialize.py +++ b/test/unit/internal/formatting/test_deserialize.py @@ -23,7 +23,7 @@ from aws_encryption_sdk.identifiers import AlgorithmSuite from aws_encryption_sdk.internal.structures import EncryptedData -from .test_values import VALUES +from ...vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_encryption_context.py b/test/unit/internal/formatting/test_encryption_context.py similarity index 99% rename from test/unit/test_encryption_context.py rename to test/unit/internal/formatting/test_encryption_context.py index 187365783..443df4065 100644 --- a/test/unit/test_encryption_context.py +++ b/test/unit/internal/formatting/test_encryption_context.py @@ -18,7 +18,7 @@ from aws_encryption_sdk.exceptions import SerializationError from aws_encryption_sdk.identifiers import ContentAADString -from .test_values import VALUES +from ...vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_serialize.py b/test/unit/internal/formatting/test_serialize.py similarity index 99% rename from test/unit/test_serialize.py rename to test/unit/internal/formatting/test_serialize.py index 511048d80..8dbe9bd05 100644 --- a/test/unit/test_serialize.py +++ b/test/unit/internal/formatting/test_serialize.py @@ -21,7 +21,7 @@ from aws_encryption_sdk.internal.structures import EncryptedData from aws_encryption_sdk.structures import EncryptedDataKey, MasterKeyInfo -from .test_values import VALUES +from ...vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_defaults.py b/test/unit/internal/test_defaults.py similarity index 100% rename from test/unit/test_defaults.py rename to test/unit/internal/test_defaults.py diff --git a/test/unit/test_internal_structures.py b/test/unit/internal/test_structures.py similarity index 97% rename from test/unit/test_internal_structures.py rename to test/unit/internal/test_structures.py index d57166982..04f4e737a 100644 --- a/test/unit/test_internal_structures.py +++ b/test/unit/internal/test_structures.py @@ -21,7 +21,7 @@ MessageNoFrameBody, ) -from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs +from ..unit_test_utils import all_invalid_kwargs, all_valid_kwargs pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/internal/utils/__init__.py b/test/unit/internal/utils/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/internal/utils/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/test_util_str_ops.py b/test/unit/internal/utils/test_str_ops.py similarity index 100% rename from test/unit/test_util_str_ops.py rename to test/unit/internal/utils/test_str_ops.py diff --git a/test/unit/test_util_streams.py b/test/unit/internal/utils/test_streams.py similarity index 96% rename from test/unit/test_util_streams.py rename to test/unit/internal/utils/test_streams.py index ab7b05152..660e4623c 100644 --- a/test/unit/test_util_streams.py +++ b/test/unit/internal/utils/test_streams.py @@ -19,7 +19,7 @@ from aws_encryption_sdk.internal.str_ops import to_bytes, to_str from aws_encryption_sdk.internal.utils.streams import InsistentReaderBytesIO, ROStream, TeeStream -from .unit_test_utils import ExactlyTwoReads, NothingButRead, SometimesIncompleteReaderIO +from ...unit_test_utils import ExactlyTwoReads, NothingButRead, SometimesIncompleteReaderIO pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_utils.py b/test/unit/internal/utils/test_utils.py similarity index 99% rename from test/unit/test_utils.py rename to test/unit/internal/utils/test_utils.py index b83e5de1d..c118ba375 100644 --- a/test/unit/test_utils.py +++ b/test/unit/internal/utils/test_utils.py @@ -24,8 +24,8 @@ from aws_encryption_sdk.keyrings.base import EncryptedDataKey from aws_encryption_sdk.structures import DataKey, MasterKeyInfo, RawDataKey -from .test_values import VALUES -from .unit_test_utils import assert_prepped_stream_identity +from ...unit_test_utils import assert_prepped_stream_identity +from ...vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/key_providers/__init__.py b/test/unit/key_providers/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/key_providers/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/key_providers/base/__init__.py b/test/unit/key_providers/base/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/key_providers/base/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/test_providers_base_master_key.py b/test/unit/key_providers/base/test_base_master_key.py similarity index 99% rename from test/unit/test_providers_base_master_key.py rename to test/unit/key_providers/base/test_base_master_key.py index 26a90ced8..4ee6c2661 100644 --- a/test/unit/test_providers_base_master_key.py +++ b/test/unit/key_providers/base/test_base_master_key.py @@ -20,7 +20,7 @@ from aws_encryption_sdk.key_providers.base import MasterKey, MasterKeyConfig, MasterKeyProvider from aws_encryption_sdk.structures import MasterKeyInfo -from .test_values import VALUES +from ...vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_providers_base_master_key_config.py b/test/unit/key_providers/base/test_base_master_key_config.py similarity index 96% rename from test/unit/test_providers_base_master_key_config.py rename to test/unit/key_providers/base/test_base_master_key_config.py index 8b6c8731a..3eb0ce406 100644 --- a/test/unit/test_providers_base_master_key_config.py +++ b/test/unit/key_providers/base/test_base_master_key_config.py @@ -15,7 +15,7 @@ from aws_encryption_sdk.key_providers.base import MasterKeyConfig -from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs +from ...unit_test_utils import all_invalid_kwargs, all_valid_kwargs pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_providers_base_master_key_provider.py b/test/unit/key_providers/base/test_base_master_key_provider.py similarity index 99% rename from test/unit/test_providers_base_master_key_provider.py rename to test/unit/key_providers/base/test_base_master_key_provider.py index 44385ea17..778068dd5 100644 --- a/test/unit/test_providers_base_master_key_provider.py +++ b/test/unit/key_providers/base/test_base_master_key_provider.py @@ -23,7 +23,7 @@ ) from aws_encryption_sdk.key_providers.base import MasterKeyProvider, MasterKeyProviderConfig -from .test_values import VALUES +from ...vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_providers_base_master_key_provider_config.py b/test/unit/key_providers/base/test_base_master_key_provider_config.py similarity index 100% rename from test/unit/test_providers_base_master_key_provider_config.py rename to test/unit/key_providers/base/test_base_master_key_provider_config.py diff --git a/test/unit/key_providers/kms/__init__.py b/test/unit/key_providers/kms/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/key_providers/kms/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/test_providers_kms_master_key.py b/test/unit/key_providers/kms/test_kms_master_key.py similarity index 99% rename from test/unit/test_providers_kms_master_key.py rename to test/unit/key_providers/kms/test_kms_master_key.py index c0ab9a968..862888ad8 100644 --- a/test/unit/test_providers_kms_master_key.py +++ b/test/unit/key_providers/kms/test_kms_master_key.py @@ -22,7 +22,7 @@ from aws_encryption_sdk.key_providers.kms import KMSMasterKey, KMSMasterKeyConfig from aws_encryption_sdk.structures import DataKey, EncryptedDataKey, MasterKeyInfo -from .test_values import VALUES +from ...vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_providers_kms_master_key_config.py b/test/unit/key_providers/kms/test_kms_master_key_config.py similarity index 97% rename from test/unit/test_providers_kms_master_key_config.py rename to test/unit/key_providers/kms/test_kms_master_key_config.py index 1501c951f..224e43c7c 100644 --- a/test/unit/test_providers_kms_master_key_config.py +++ b/test/unit/key_providers/kms/test_kms_master_key_config.py @@ -17,7 +17,7 @@ from aws_encryption_sdk.key_providers.base import MasterKeyConfig from aws_encryption_sdk.key_providers.kms import _PROVIDER_ID, KMSMasterKeyConfig -from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs +from ...unit_test_utils import all_invalid_kwargs, all_valid_kwargs pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_providers_kms_master_key_provider.py b/test/unit/key_providers/kms/test_kms_master_key_provider.py similarity index 100% rename from test/unit/test_providers_kms_master_key_provider.py rename to test/unit/key_providers/kms/test_kms_master_key_provider.py diff --git a/test/unit/test_providers_kms_master_key_provider_config.py b/test/unit/key_providers/kms/test_kms_master_key_provider_config.py similarity index 97% rename from test/unit/test_providers_kms_master_key_provider_config.py rename to test/unit/key_providers/kms/test_kms_master_key_provider_config.py index affa74102..9b8f9fd74 100644 --- a/test/unit/test_providers_kms_master_key_provider_config.py +++ b/test/unit/key_providers/kms/test_kms_master_key_provider_config.py @@ -17,7 +17,7 @@ from aws_encryption_sdk.key_providers.base import MasterKeyProviderConfig from aws_encryption_sdk.key_providers.kms import KMSMasterKeyProviderConfig -from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs +from ...unit_test_utils import all_invalid_kwargs, all_valid_kwargs pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/key_providers/raw/__init__.py b/test/unit/key_providers/raw/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/key_providers/raw/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/test_providers_raw_master_key.py b/test/unit/key_providers/raw/test_raw_master_key.py similarity index 99% rename from test/unit/test_providers_raw_master_key.py rename to test/unit/key_providers/raw/test_raw_master_key.py index 9abcd14c6..8b9ba658d 100644 --- a/test/unit/test_providers_raw_master_key.py +++ b/test/unit/key_providers/raw/test_raw_master_key.py @@ -20,7 +20,7 @@ from aws_encryption_sdk.key_providers.raw import RawMasterKey, RawMasterKeyConfig from aws_encryption_sdk.structures import DataKey, EncryptedDataKey, MasterKeyInfo, RawDataKey -from .test_values import VALUES +from ...vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_providers_raw_master_key_config.py b/test/unit/key_providers/raw/test_raw_master_key_config.py similarity index 96% rename from test/unit/test_providers_raw_master_key_config.py rename to test/unit/key_providers/raw/test_raw_master_key_config.py index d06feae87..bbdbc5bef 100644 --- a/test/unit/test_providers_raw_master_key_config.py +++ b/test/unit/key_providers/raw/test_raw_master_key_config.py @@ -19,7 +19,7 @@ from aws_encryption_sdk.key_providers.base import MasterKeyConfig from aws_encryption_sdk.key_providers.raw import RawMasterKeyConfig -from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs +from ...unit_test_utils import all_invalid_kwargs, all_valid_kwargs pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_providers_raw_master_key_provider.py b/test/unit/key_providers/raw/test_raw_master_key_provider.py similarity index 98% rename from test/unit/test_providers_raw_master_key_provider.py rename to test/unit/key_providers/raw/test_raw_master_key_provider.py index 5128b1e22..9205d3563 100644 --- a/test/unit/test_providers_raw_master_key_provider.py +++ b/test/unit/key_providers/raw/test_raw_master_key_provider.py @@ -18,7 +18,7 @@ from aws_encryption_sdk.key_providers.base import MasterKeyProvider, MasterKeyProviderConfig from aws_encryption_sdk.key_providers.raw import RawMasterKeyProvider -from .test_values import VALUES +from ...vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/keyrings/raw/test_raw_rsa.py b/test/unit/keyrings/raw/test_raw_rsa.py index e460a4221..460b7280f 100644 --- a/test/unit/keyrings/raw/test_raw_rsa.py +++ b/test/unit/keyrings/raw/test_raw_rsa.py @@ -23,7 +23,6 @@ from aws_encryption_sdk.keyrings.base import Keyring from aws_encryption_sdk.keyrings.raw import RawRSAKeyring -from ...test_values import VALUES from ...unit_test_utils import ( _BACKEND, _DATA_KEY, @@ -38,6 +37,7 @@ get_encryption_materials_with_data_encryption_key, get_encryption_materials_without_data_encryption_key, ) +from ...vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/materials_managers/__init__.py b/test/unit/materials_managers/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/materials_managers/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/test_material_managers_base.py b/test/unit/materials_managers/test_base.py similarity index 100% rename from test/unit/test_material_managers_base.py rename to test/unit/materials_managers/test_base.py diff --git a/test/unit/test_material_managers_caching.py b/test/unit/materials_managers/test_caching.py similarity index 100% rename from test/unit/test_material_managers_caching.py rename to test/unit/materials_managers/test_caching.py diff --git a/test/unit/test_material_managers_default.py b/test/unit/materials_managers/test_default.py similarity index 100% rename from test/unit/test_material_managers_default.py rename to test/unit/materials_managers/test_default.py diff --git a/test/unit/test_material_managers.py b/test/unit/materials_managers/test_material_managers.py similarity index 100% rename from test/unit/test_material_managers.py rename to test/unit/materials_managers/test_material_managers.py diff --git a/test/unit/streaming_client/__init__.py b/test/unit/streaming_client/__init__.py new file mode 100644 index 000000000..ad0e71d6c --- /dev/null +++ b/test/unit/streaming_client/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"). You +# may not use this file except in compliance with the License. A copy of +# the License is located at +# +# http://aws.amazon.com/apache2.0/ +# +# or in the "license" file accompanying this file. This file is +# 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. +"""Dummy stub to make linters work better.""" diff --git a/test/unit/test_streaming_client_configs.py b/test/unit/streaming_client/test_configs.py similarity index 98% rename from test/unit/test_streaming_client_configs.py rename to test/unit/streaming_client/test_configs.py index 98e5cb13c..a98a38957 100644 --- a/test/unit/test_streaming_client_configs.py +++ b/test/unit/streaming_client/test_configs.py @@ -22,7 +22,7 @@ from aws_encryption_sdk.materials_managers.default import DefaultCryptoMaterialsManager from aws_encryption_sdk.streaming_client import DecryptorConfig, EncryptorConfig, _ClientConfig -from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs, build_valid_kwargs_list +from ..unit_test_utils import all_invalid_kwargs, all_valid_kwargs, build_valid_kwargs_list pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_streaming_client_encryption_stream.py b/test/unit/streaming_client/test_encryption_stream.py similarity index 99% rename from test/unit/test_streaming_client_encryption_stream.py rename to test/unit/streaming_client/test_encryption_stream.py index e3a06347a..345e9939e 100644 --- a/test/unit/test_streaming_client_encryption_stream.py +++ b/test/unit/streaming_client/test_encryption_stream.py @@ -23,8 +23,8 @@ from aws_encryption_sdk.key_providers.base import MasterKeyProvider from aws_encryption_sdk.streaming_client import _ClientConfig, _EncryptionStream -from .test_values import VALUES -from .unit_test_utils import assert_prepped_stream_identity +from ..unit_test_utils import assert_prepped_stream_identity +from ..vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_streaming_client_stream_decryptor.py b/test/unit/streaming_client/test_stream_decryptor.py similarity index 99% rename from test/unit/test_streaming_client_stream_decryptor.py rename to test/unit/streaming_client/test_stream_decryptor.py index 6a3ccb56d..06e7f0816 100644 --- a/test/unit/test_streaming_client_stream_decryptor.py +++ b/test/unit/streaming_client/test_stream_decryptor.py @@ -22,7 +22,7 @@ from aws_encryption_sdk.materials_managers.base import CryptoMaterialsManager from aws_encryption_sdk.streaming_client import StreamDecryptor -from .test_values import VALUES +from ..vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_streaming_client_stream_encryptor.py b/test/unit/streaming_client/test_stream_encryptor.py similarity index 99% rename from test/unit/test_streaming_client_stream_encryptor.py rename to test/unit/streaming_client/test_stream_encryptor.py index 5cb2b8e37..42516444a 100644 --- a/test/unit/test_streaming_client_stream_encryptor.py +++ b/test/unit/streaming_client/test_stream_encryptor.py @@ -30,7 +30,7 @@ from aws_encryption_sdk.streaming_client import StreamEncryptor from aws_encryption_sdk.structures import MessageHeader -from .test_values import VALUES +from ..vectors import VALUES pytestmark = [pytest.mark.unit, pytest.mark.local] diff --git a/test/unit/test_aws_encryption_sdk.py b/test/unit/test_client.py similarity index 100% rename from test/unit/test_aws_encryption_sdk.py rename to test/unit/test_client.py diff --git a/test/unit/test_values.py b/test/unit/vectors.py similarity index 100% rename from test/unit/test_values.py rename to test/unit/vectors.py