Skip to content

Commit b6e7f35

Browse files
committed
reorganize unit tests
1 parent f0662b6 commit b6e7f35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+102
-26
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
"""Dummy stub to make linters work better."""

test/unit/test_crypto_authentication_signer.py renamed to test/unit/aws_encryption_sdk/internal/crypto/authentication/test_signer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from aws_encryption_sdk.internal.crypto.authentication import Signer
2020
from aws_encryption_sdk.internal.defaults import ALGORITHM
2121

22-
from .test_crypto import VALUES
22+
from ..test_crypto import VALUES
2323

2424
pytestmark = [pytest.mark.unit, pytest.mark.local]
2525

test/unit/test_crypto_authentication_verifier.py renamed to test/unit/aws_encryption_sdk/internal/crypto/authentication/test_verifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from aws_encryption_sdk.internal.crypto.authentication import Verifier
2020
from aws_encryption_sdk.internal.defaults import ALGORITHM
2121

22-
from .test_crypto import VALUES
22+
from ..test_crypto import VALUES
2323

2424
pytestmark = [pytest.mark.unit, pytest.mark.local]
2525

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
"""Dummy stub to make linters work better."""

test/unit/test_crypto_elliptic_curve.py renamed to test/unit/aws_encryption_sdk/internal/crypto/test_elliptic_curve.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from cryptography.hazmat.primitives.asymmetric import ec
1818
from cryptography.utils import InterfaceNotImplemented
1919
from mock import MagicMock, sentinel
20-
from pytest_mock import mocker # noqa pylint: disable=unused-import
2120

2221
import aws_encryption_sdk.internal.crypto.elliptic_curve
2322
from aws_encryption_sdk.exceptions import NotSupportedError
@@ -30,7 +29,6 @@
3029
_ECCCurveParameters,
3130
generate_ecc_signing_key,
3231
)
33-
3432
from .test_crypto import VALUES
3533

3634
pytestmark = [pytest.mark.unit, pytest.mark.local]

test/unit/test_deserialize.py renamed to test/unit/aws_encryption_sdk/internal/formatting/test_deserialize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from aws_encryption_sdk.identifiers import AlgorithmSuite
2424
from aws_encryption_sdk.internal.structures import EncryptedData
2525

26-
from .test_values import VALUES
26+
from ....test_values import VALUES
2727

2828
pytestmark = [pytest.mark.unit, pytest.mark.local]
2929

test/unit/test_encryption_context.py renamed to test/unit/aws_encryption_sdk/internal/formatting/test_encryption_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from aws_encryption_sdk.exceptions import SerializationError
1919
from aws_encryption_sdk.identifiers import ContentAADString
2020

21-
from .test_values import VALUES
21+
from ....test_values import VALUES
2222

2323
pytestmark = [pytest.mark.unit, pytest.mark.local]
2424

test/unit/test_serialize.py renamed to test/unit/aws_encryption_sdk/internal/formatting/test_serialize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from aws_encryption_sdk.internal.structures import EncryptedData
2222
from aws_encryption_sdk.structures import EncryptedDataKey, MasterKeyInfo
2323

24-
from .test_values import VALUES
24+
from ....test_values import VALUES
2525

2626
pytestmark = [pytest.mark.unit, pytest.mark.local]
2727

test/unit/test_internal_structures.py renamed to test/unit/aws_encryption_sdk/internal/test_structures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
MessageNoFrameBody,
2222
)
2323

24-
from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs
24+
from ...unit_test_utils import all_invalid_kwargs, all_valid_kwargs
2525

2626
pytestmark = [pytest.mark.unit, pytest.mark.local]
2727

test/unit/test_util_streams.py renamed to test/unit/aws_encryption_sdk/internal/utils/test_streams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from aws_encryption_sdk.internal.str_ops import to_bytes, to_str
2020
from aws_encryption_sdk.internal.utils.streams import InsistentReaderBytesIO, ROStream, TeeStream
2121

22-
from .unit_test_utils import ExactlyTwoReads, NothingButRead, SometimesIncompleteReaderIO
22+
from ....unit_test_utils import ExactlyTwoReads, NothingButRead, SometimesIncompleteReaderIO
2323

2424
pytestmark = [pytest.mark.unit, pytest.mark.local]
2525

test/unit/test_utils.py renamed to test/unit/aws_encryption_sdk/internal/utils/test_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
from aws_encryption_sdk.keyrings.base import EncryptedDataKey
2525
from aws_encryption_sdk.structures import DataKey, MasterKeyInfo, RawDataKey
2626

27-
from .test_values import VALUES
28-
from .unit_test_utils import assert_prepped_stream_identity
27+
from ....test_values import VALUES
28+
from ....unit_test_utils import assert_prepped_stream_identity
2929

3030
pytestmark = [pytest.mark.unit, pytest.mark.local]
3131

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
"""Dummy stub to make linters work better."""

test/unit/test_providers_base_master_key.py renamed to test/unit/aws_encryption_sdk/key_providers/base/test_base_master_key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from aws_encryption_sdk.key_providers.base import MasterKey, MasterKeyConfig, MasterKeyProvider
2121
from aws_encryption_sdk.structures import MasterKeyInfo
2222

23-
from .test_values import VALUES
23+
from ....test_values import VALUES
2424

2525
pytestmark = [pytest.mark.unit, pytest.mark.local]
2626

test/unit/test_providers_base_master_key_config.py renamed to test/unit/aws_encryption_sdk/key_providers/base/test_base_master_key_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from aws_encryption_sdk.key_providers.base import MasterKeyConfig
1717

18-
from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs
18+
from ....unit_test_utils import all_invalid_kwargs, all_valid_kwargs
1919

2020
pytestmark = [pytest.mark.unit, pytest.mark.local]
2121

test/unit/test_providers_base_master_key_provider.py renamed to test/unit/aws_encryption_sdk/key_providers/base/test_base_master_key_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)
2424
from aws_encryption_sdk.key_providers.base import MasterKeyProvider, MasterKeyProviderConfig
2525

26-
from .test_values import VALUES
26+
from ....test_values import VALUES
2727

2828
pytestmark = [pytest.mark.unit, pytest.mark.local]
2929

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
"""Dummy stub to make linters work better."""

test/unit/test_providers_kms_master_key.py renamed to test/unit/aws_encryption_sdk/key_providers/kms/test_kms_master_key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from aws_encryption_sdk.key_providers.kms import KMSMasterKey, KMSMasterKeyConfig
2323
from aws_encryption_sdk.structures import DataKey, EncryptedDataKey, MasterKeyInfo
2424

25-
from .test_values import VALUES
25+
from ....test_values import VALUES
2626

2727
pytestmark = [pytest.mark.unit, pytest.mark.local]
2828

test/unit/test_providers_kms_master_key_config.py renamed to test/unit/aws_encryption_sdk/key_providers/kms/test_kms_master_key_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from aws_encryption_sdk.key_providers.base import MasterKeyConfig
1818
from aws_encryption_sdk.key_providers.kms import _PROVIDER_ID, KMSMasterKeyConfig
1919

20-
from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs
20+
from ....unit_test_utils import all_invalid_kwargs, all_valid_kwargs
2121

2222
pytestmark = [pytest.mark.unit, pytest.mark.local]
2323

test/unit/test_providers_kms_master_key_provider_config.py renamed to test/unit/aws_encryption_sdk/key_providers/kms/test_kms_master_key_provider_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from aws_encryption_sdk.key_providers.base import MasterKeyProviderConfig
1818
from aws_encryption_sdk.key_providers.kms import KMSMasterKeyProviderConfig
1919

20-
from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs
20+
from ....unit_test_utils import all_invalid_kwargs, all_valid_kwargs
2121

2222
pytestmark = [pytest.mark.unit, pytest.mark.local]
2323

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
"""Dummy stub to make linters work better."""

test/unit/test_providers_raw_master_key.py renamed to test/unit/aws_encryption_sdk/key_providers/raw/test_raw_master_key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from aws_encryption_sdk.key_providers.raw import RawMasterKey, RawMasterKeyConfig
2121
from aws_encryption_sdk.structures import DataKey, EncryptedDataKey, MasterKeyInfo, RawDataKey
2222

23-
from .test_values import VALUES
23+
from ....test_values import VALUES
2424

2525
pytestmark = [pytest.mark.unit, pytest.mark.local]
2626

test/unit/test_providers_raw_master_key_config.py renamed to test/unit/aws_encryption_sdk/key_providers/raw/test_raw_master_key_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from aws_encryption_sdk.key_providers.base import MasterKeyConfig
2020
from aws_encryption_sdk.key_providers.raw import RawMasterKeyConfig
2121

22-
from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs
22+
from ....unit_test_utils import all_invalid_kwargs, all_valid_kwargs
2323

2424
pytestmark = [pytest.mark.unit, pytest.mark.local]
2525

test/unit/test_providers_raw_master_key_provider.py renamed to test/unit/aws_encryption_sdk/key_providers/raw/test_raw_master_key_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from aws_encryption_sdk.key_providers.base import MasterKeyProvider, MasterKeyProviderConfig
1919
from aws_encryption_sdk.key_providers.raw import RawMasterKeyProvider
2020

21-
from .test_values import VALUES
21+
from ....test_values import VALUES
2222

2323
pytestmark = [pytest.mark.unit, pytest.mark.local]
2424

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"). You
4+
# may not use this file except in compliance with the License. A copy of
5+
# the License is located at
6+
#
7+
# http://aws.amazon.com/apache2.0/
8+
#
9+
# or in the "license" file accompanying this file. This file is
10+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11+
# ANY KIND, either express or implied. See the License for the specific
12+
# language governing permissions and limitations under the License.
13+
"""Dummy stub to make linters work better."""

test/unit/test_streaming_client_configs.py renamed to test/unit/aws_encryption_sdk/streaming_client/test_configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from aws_encryption_sdk.materials_managers.default import DefaultCryptoMaterialsManager
2323
from aws_encryption_sdk.streaming_client import DecryptorConfig, EncryptorConfig, _ClientConfig
2424

25-
from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs, build_valid_kwargs_list
25+
from ...unit_test_utils import all_invalid_kwargs, all_valid_kwargs, build_valid_kwargs_list
2626

2727
pytestmark = [pytest.mark.unit, pytest.mark.local]
2828

test/unit/test_streaming_client_encryption_stream.py renamed to test/unit/aws_encryption_sdk/streaming_client/test_encryption_stream.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
from aws_encryption_sdk.key_providers.base import MasterKeyProvider
2424
from aws_encryption_sdk.streaming_client import _ClientConfig, _EncryptionStream
2525

26-
from .test_values import VALUES
27-
from .unit_test_utils import assert_prepped_stream_identity
26+
from ...test_values import VALUES
27+
from ...unit_test_utils import assert_prepped_stream_identity
2828

2929
pytestmark = [pytest.mark.unit, pytest.mark.local]
3030

test/unit/test_streaming_client_stream_decryptor.py renamed to test/unit/aws_encryption_sdk/streaming_client/test_stream_decryptor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from aws_encryption_sdk.materials_managers.base import CryptoMaterialsManager
2323
from aws_encryption_sdk.streaming_client import StreamDecryptor
2424

25-
from .test_values import VALUES
25+
from ...test_values import VALUES
2626

2727
pytestmark = [pytest.mark.unit, pytest.mark.local]
2828

test/unit/test_streaming_client_stream_encryptor.py renamed to test/unit/aws_encryption_sdk/streaming_client/test_stream_encryptor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from aws_encryption_sdk.streaming_client import StreamEncryptor
3131
from aws_encryption_sdk.structures import MessageHeader
3232

33-
from .test_values import VALUES
33+
from ...test_values import VALUES
3434

3535
pytestmark = [pytest.mark.unit, pytest.mark.local]
3636

test/unit/test_structures.py renamed to test/unit/aws_encryption_sdk/test_structures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from aws_encryption_sdk.identifiers import Algorithm, ContentType, ObjectType, SerializationVersion
1717
from aws_encryption_sdk.structures import DataKey, EncryptedDataKey, MasterKeyInfo, MessageHeader, RawDataKey
1818

19-
from .unit_test_utils import all_invalid_kwargs, all_valid_kwargs
19+
from ..unit_test_utils import all_invalid_kwargs, all_valid_kwargs
2020

2121
pytestmark = [pytest.mark.unit, pytest.mark.local]
2222

0 commit comments

Comments
 (0)