Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8b7c769

Browse files
committedOct 3, 2019
add test to verify that EncryptionContext.attributes is not included in str/repr
1 parent 9d99241 commit 8b7c769

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
 

‎test/unit/test_structures.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
"""Unit tests for ``dynamodb_encryption_sdk.structures``."""
14+
import pytest
15+
16+
from dynamodb_encryption_sdk.structures import EncryptionContext
17+
18+
19+
@pytest.mark.parametrize("operator", (repr, str))
20+
def test_encryption_context_repr(operator):
21+
value = EncryptionContext(attributes={"unique_name": {"S": "unique_value"}})
22+
23+
test = operator(value)
24+
25+
assert "unique_name" not in test
26+
assert "unique_value" not in test

0 commit comments

Comments
 (0)
Please sign in to comment.