Skip to content

Commit a210236

Browse files
committed
rename ItemAction to CryptoAction to make the name make more sense: it is used for attributes, not items
1 parent e707984 commit a210236

File tree

9 files changed

+94
-94
lines changed

9 files changed

+94
-94
lines changed

src/dynamodb_encryption_sdk/encrypted/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
pass
2323

2424
from dynamodb_encryption_sdk.exceptions import InvalidArgumentError
25-
from dynamodb_encryption_sdk.identifiers import ItemAction
25+
from dynamodb_encryption_sdk.identifiers import CryptoAction
2626
from dynamodb_encryption_sdk.material_providers import CryptographicMaterialsProvider
2727
from dynamodb_encryption_sdk.materials import DecryptionMaterials, EncryptionMaterials # noqa pylint: disable=unused-import
2828
from dynamodb_encryption_sdk.structures import AttributeActions, EncryptionContext
@@ -50,11 +50,11 @@ def __attrs_post_init__(self):
5050
# type: () -> None
5151
"""Make sure that primary index attributes are not being encrypted."""
5252
if self.encryption_context.partition_key_name is not None:
53-
if self.attribute_actions.action(self.encryption_context.partition_key_name) is ItemAction.ENCRYPT_AND_SIGN:
53+
if self.attribute_actions.action(self.encryption_context.partition_key_name) is CryptoAction.ENCRYPT_AND_SIGN:
5454
raise InvalidArgumentError('Cannot encrypt partition key')
5555

5656
if self.encryption_context.sort_key_name is not None:
57-
if self.attribute_actions.action(self.encryption_context.sort_key_name) is ItemAction.ENCRYPT_AND_SIGN:
57+
if self.attribute_actions.action(self.encryption_context.sort_key_name) is CryptoAction.ENCRYPT_AND_SIGN:
5858
raise InvalidArgumentError('Cannot encrypt sort key')
5959

6060
def decryption_materials(self):

src/dynamodb_encryption_sdk/encrypted/item.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
pass
1919

2020
from dynamodb_encryption_sdk.exceptions import DecryptionError, EncryptionError
21-
from dynamodb_encryption_sdk.identifiers import ItemAction
21+
from dynamodb_encryption_sdk.identifiers import CryptoAction
2222
from dynamodb_encryption_sdk.internal.crypto.authentication import sign_item, verify_item_signature
2323
from dynamodb_encryption_sdk.internal.crypto.encryption import decrypt_attribute, encrypt_attribute
2424
from dynamodb_encryption_sdk.internal.formatting.material_description import (
@@ -72,7 +72,7 @@ def encrypt_dynamodb_item(item, crypto_config):
7272

7373
encrypted_item = {}
7474
for name, attribute in item.items():
75-
if crypto_config.attribute_actions.action(name) is not ItemAction.ENCRYPT_AND_SIGN:
75+
if crypto_config.attribute_actions.action(name) is not CryptoAction.ENCRYPT_AND_SIGN:
7676
encrypted_item[name] = attribute.copy()
7777
continue
7878

@@ -172,7 +172,7 @@ def decrypt_dynamodb_item(item, crypto_config):
172172
# Once the signature has been verified, actually decrypt the item attributes.
173173
decrypted_item = {}
174174
for name, attribute in item.items():
175-
if inner_crypto_config.attribute_actions.action(name) is not ItemAction.ENCRYPT_AND_SIGN:
175+
if inner_crypto_config.attribute_actions.action(name) is not CryptoAction.ENCRYPT_AND_SIGN:
176176
decrypted_item[name] = attribute.copy()
177177
continue
178178

src/dynamodb_encryption_sdk/identifiers.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@
1313
"""Unique identifiers used by the DynamoDB Encryption Client."""
1414
from enum import Enum
1515

16-
__all__ = ('LOGGER_NAME', 'ItemAction', 'EncryptionKeyType', 'KeyEncodingType')
16+
__all__ = ('LOGGER_NAME', 'CryptoAction', 'EncryptionKeyType', 'KeyEncodingType')
1717
__version__ = '0.0.0'
1818

1919
LOGGER_NAME = 'dynamodb_encryption_sdk'
2020

2121

22-
class ItemAction(Enum):
22+
class CryptoAction(Enum):
2323
"""Possible actions to take on an item attribute."""
2424

2525
DO_NOTHING = 0
2626
SIGN_ONLY = 1
2727
ENCRYPT_AND_SIGN = 2
2828

2929
def __gt__(self, other):
30-
# type: (ItemAction) -> bool
31-
"""Define ItemAction equality."""
30+
# type: (CryptoAction) -> bool
31+
"""Define CryptoAction equality."""
3232
return not self.__lt__(other) and not self.__eq__(other)
3333

3434
def __lt__(self, other):
35-
# type: (ItemAction) -> bool
36-
"""Define ItemAction equality."""
35+
# type: (CryptoAction) -> bool
36+
"""Define CryptoAction equality."""
3737
return self.value < other.value
3838

3939
def __eq__(self, other):
40-
# type: (ItemAction) -> bool
41-
"""Define ItemAction equality."""
40+
# type: (CryptoAction) -> bool
41+
"""Define CryptoAction equality."""
4242
return self.value == other.value
4343

4444

src/dynamodb_encryption_sdk/internal/crypto/authentication.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from dynamodb_encryption_sdk.delegated_keys import DelegatedKey # noqa pylint: disable=unused-import
1818
from dynamodb_encryption_sdk.encrypted import CryptoConfig # noqa pylint: disable=unused-import
19-
from dynamodb_encryption_sdk.identifiers import ItemAction
19+
from dynamodb_encryption_sdk.identifiers import CryptoAction
2020
from dynamodb_encryption_sdk.internal.formatting.serialize.attribute import serialize_attribute
2121
from dynamodb_encryption_sdk.internal.identifiers import SignatureValues, Tag, TEXT_ENCODING
2222
from dynamodb_encryption_sdk.structures import AttributeActions # noqa pylint: disable=unused-import
@@ -89,15 +89,15 @@ def _string_to_sign(item, table_name, attribute_actions):
8989
))
9090
for key in sorted(item.keys()):
9191
action = attribute_actions.action(key)
92-
if action is ItemAction.DO_NOTHING:
92+
if action is CryptoAction.DO_NOTHING:
9393
continue
9494

9595
data_to_sign.extend(_hash_data(
9696
hasher=hasher,
9797
data=key.encode(TEXT_ENCODING)
9898
))
9999

100-
if action is ItemAction.SIGN_ONLY:
100+
if action is CryptoAction.SIGN_ONLY:
101101
data_to_sign.extend(SignatureValues.PLAINTEXT.sha256)
102102
else:
103103
data_to_sign.extend(SignatureValues.ENCRYPTED.sha256)

src/dynamodb_encryption_sdk/structures.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from dynamodb_encryption_sdk.exceptions import InvalidArgumentError
2020
from dynamodb_encryption_sdk.internal.identifiers import ReservedAttributes
2121
from dynamodb_encryption_sdk.internal.validators import dictionary_validator, iterable_validator
22-
from .identifiers import ItemAction
22+
from .identifiers import CryptoAction
2323

2424
__all__ = ('EncryptionContext', 'AttributeActions', 'TableIndex', 'TableInfo')
2525

@@ -81,16 +81,16 @@ class AttributeActions(object):
8181
"""Configuration resource used to determine what action should be taken for a specific attribute.
8282
8383
:param default_action: Action to take if no specific action is defined in ``attribute_actions``
84-
:type default_action: dynamodb_encryption_sdk.identifiers.ItemAction
84+
:type default_action: dynamodb_encryption_sdk.identifiers.CryptoAction
8585
:param dict attribute_actions: Dictionary mapping attribute names to specific actions
8686
"""
8787

8888
default_action = attr.ib(
89-
validator=attr.validators.instance_of(ItemAction),
90-
default=ItemAction.ENCRYPT_AND_SIGN
89+
validator=attr.validators.instance_of(CryptoAction),
90+
default=CryptoAction.ENCRYPT_AND_SIGN
9191
)
9292
attribute_actions = attr.ib(
93-
validator=dictionary_validator(six.string_types, ItemAction),
93+
validator=dictionary_validator(six.string_types, CryptoAction),
9494
default=attr.Factory(dict)
9595
)
9696

@@ -104,12 +104,12 @@ def __attrs_post_init__(self):
104104
# Enums are not hashable, but their names are unique
105105
_unique_actions = set([self.default_action.name])
106106
_unique_actions.update(set([action.name for action in self.attribute_actions.values()]))
107-
no_actions = _unique_actions == set([ItemAction.DO_NOTHING.name])
107+
no_actions = _unique_actions == set([CryptoAction.DO_NOTHING.name])
108108
self.take_no_actions = no_actions # attrs confuses pylint: disable=attribute-defined-outside-init
109109

110110
def action(self, attribute_name):
111-
# (text) -> ItemAction
112-
"""Determines the correct ItemAction to apply to a supplied attribute based on this config."""
111+
# (text) -> CryptoAction
112+
"""Determines the correct CryptoAction to apply to a supplied attribute based on this config."""
113113
return self.attribute_actions.get(attribute_name, self.default_action)
114114

115115
def copy(self):
@@ -136,7 +136,7 @@ def set_index_keys(self, *keys):
136136
attributes
137137
"""
138138
for key in keys:
139-
index_action = min(self.action(key), ItemAction.SIGN_ONLY)
139+
index_action = min(self.action(key), CryptoAction.SIGN_ONLY)
140140
try:
141141
if self.attribute_actions[key] is not index_action:
142142
raise InvalidArgumentError(

test/functional/functional_test_utils.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
from dynamodb_encryption_sdk.delegated_keys.jce import JceNameLocalDelegatedKey
2727
from dynamodb_encryption_sdk.encrypted.item import decrypt_python_item, encrypt_python_item
28-
from dynamodb_encryption_sdk.identifiers import ItemAction
28+
from dynamodb_encryption_sdk.identifiers import CryptoAction
2929
from dynamodb_encryption_sdk.internal.identifiers import ReservedAttributes
3030
from dynamodb_encryption_sdk.material_providers.static import StaticCryptographicMaterialsProvider
3131
from dynamodb_encryption_sdk.material_providers.wrapped import WrappedCryptographicMaterialsProvider
@@ -252,49 +252,49 @@ def set_parametrized_cmp(metafunc):
252252

253253
_ACTIONS = {
254254
'hypothesis_actions': (
255-
pytest.param(AttributeActions(default_action=ItemAction.ENCRYPT_AND_SIGN), id='encrypt all'),
256-
pytest.param(AttributeActions(default_action=ItemAction.SIGN_ONLY), id='sign only all'),
257-
pytest.param(AttributeActions(default_action=ItemAction.DO_NOTHING), id='do nothing'),
255+
pytest.param(AttributeActions(default_action=CryptoAction.ENCRYPT_AND_SIGN), id='encrypt all'),
256+
pytest.param(AttributeActions(default_action=CryptoAction.SIGN_ONLY), id='sign only all'),
257+
pytest.param(AttributeActions(default_action=CryptoAction.DO_NOTHING), id='do nothing'),
258258
)
259259
}
260260
_ACTIONS['parametrized_actions'] = _ACTIONS['hypothesis_actions'] + (
261261
pytest.param(
262262
AttributeActions(
263-
default_action=ItemAction.ENCRYPT_AND_SIGN,
263+
default_action=CryptoAction.ENCRYPT_AND_SIGN,
264264
attribute_actions={
265-
'number_set': ItemAction.SIGN_ONLY,
266-
'string_set': ItemAction.SIGN_ONLY,
267-
'binary_set': ItemAction.SIGN_ONLY
265+
'number_set': CryptoAction.SIGN_ONLY,
266+
'string_set': CryptoAction.SIGN_ONLY,
267+
'binary_set': CryptoAction.SIGN_ONLY
268268
}
269269
),
270270
id='sign sets, encrypt everything else'
271271
),
272272
pytest.param(
273273
AttributeActions(
274-
default_action=ItemAction.ENCRYPT_AND_SIGN,
274+
default_action=CryptoAction.ENCRYPT_AND_SIGN,
275275
attribute_actions={
276-
'number_set': ItemAction.DO_NOTHING,
277-
'string_set': ItemAction.DO_NOTHING,
278-
'binary_set': ItemAction.DO_NOTHING
276+
'number_set': CryptoAction.DO_NOTHING,
277+
'string_set': CryptoAction.DO_NOTHING,
278+
'binary_set': CryptoAction.DO_NOTHING
279279
}
280280
),
281281
id='ignore sets, encrypt everything else'
282282
),
283283
pytest.param(
284284
AttributeActions(
285-
default_action=ItemAction.DO_NOTHING,
286-
attribute_actions={'map': ItemAction.ENCRYPT_AND_SIGN}
285+
default_action=CryptoAction.DO_NOTHING,
286+
attribute_actions={'map': CryptoAction.ENCRYPT_AND_SIGN}
287287
),
288288
id='encrypt map, ignore everything else'
289289
),
290290
pytest.param(
291291
AttributeActions(
292-
default_action=ItemAction.SIGN_ONLY,
292+
default_action=CryptoAction.SIGN_ONLY,
293293
attribute_actions={
294-
'number_set': ItemAction.DO_NOTHING,
295-
'string_set': ItemAction.DO_NOTHING,
296-
'binary_set': ItemAction.DO_NOTHING,
297-
'map': ItemAction.ENCRYPT_AND_SIGN
294+
'number_set': CryptoAction.DO_NOTHING,
295+
'string_set': CryptoAction.DO_NOTHING,
296+
'binary_set': CryptoAction.DO_NOTHING,
297+
'map': CryptoAction.ENCRYPT_AND_SIGN
298298
}
299299
),
300300
id='ignore sets, encrypt map, sign everything else'
@@ -353,7 +353,7 @@ def check_encrypted_item(plaintext_item, ciphertext_item, attribute_actions):
353353
continue
354354

355355
# If the attribute should have been encrypted, verify that it is Binary and different from the original
356-
if attribute_actions.action(name) is ItemAction.ENCRYPT_AND_SIGN:
356+
if attribute_actions.action(name) is CryptoAction.ENCRYPT_AND_SIGN:
357357
assert isinstance(value, Binary)
358358
assert value != plaintext_item[name]
359359
# Otherwise, verify that it is the same as the original

test/functional/functional_test_vector_generators.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
from boto3.dynamodb.types import Binary
2121

22-
from dynamodb_encryption_sdk.identifiers import ItemAction
22+
from dynamodb_encryption_sdk.identifiers import CryptoAction
2323
from dynamodb_encryption_sdk.structures import AttributeActions
2424

2525
_ATTRIBUTE_TEST_VECTOR_FILE_TEMPLATE = os.path.join(
@@ -133,9 +133,9 @@ def material_description_test_vectors():
133133

134134

135135
ACTION_MAP = {
136-
'encrypt': ItemAction.ENCRYPT_AND_SIGN,
137-
'sign': ItemAction.SIGN_ONLY,
138-
'nothing': ItemAction.DO_NOTHING
136+
'encrypt': CryptoAction.ENCRYPT_AND_SIGN,
137+
'sign': CryptoAction.SIGN_ONLY,
138+
'nothing': CryptoAction.DO_NOTHING
139139
}
140140

141141

@@ -149,7 +149,7 @@ def string_to_sign_test_vectors():
149149
}
150150
bare_actions = {key: ACTION_MAP[value['action']] for key, value in vector['item'].items()}
151151
attribute_actions = AttributeActions(
152-
default_action=ItemAction.DO_NOTHING,
152+
default_action=CryptoAction.DO_NOTHING,
153153
attribute_actions=bare_actions
154154
)
155155
yield (

test/functional/test_identifiers.py

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,54 +15,54 @@
1515

1616
import pytest
1717

18-
from dynamodb_encryption_sdk.identifiers import ItemAction
18+
from dynamodb_encryption_sdk.identifiers import CryptoAction
1919

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

2222

2323
@pytest.mark.parametrize('left, right, expected', (
24-
(ItemAction.ENCRYPT_AND_SIGN, ItemAction.ENCRYPT_AND_SIGN, ItemAction.ENCRYPT_AND_SIGN),
25-
(ItemAction.ENCRYPT_AND_SIGN, ItemAction.SIGN_ONLY, ItemAction.ENCRYPT_AND_SIGN),
26-
(ItemAction.ENCRYPT_AND_SIGN, ItemAction.DO_NOTHING, ItemAction.ENCRYPT_AND_SIGN),
27-
(ItemAction.SIGN_ONLY, ItemAction.ENCRYPT_AND_SIGN, ItemAction.ENCRYPT_AND_SIGN),
28-
(ItemAction.SIGN_ONLY, ItemAction.SIGN_ONLY, ItemAction.SIGN_ONLY),
29-
(ItemAction.SIGN_ONLY, ItemAction.DO_NOTHING, ItemAction.SIGN_ONLY),
30-
(ItemAction.DO_NOTHING, ItemAction.ENCRYPT_AND_SIGN, ItemAction.ENCRYPT_AND_SIGN),
31-
(ItemAction.DO_NOTHING, ItemAction.SIGN_ONLY, ItemAction.SIGN_ONLY),
32-
(ItemAction.DO_NOTHING, ItemAction.DO_NOTHING, ItemAction.DO_NOTHING),
24+
(CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.ENCRYPT_AND_SIGN),
25+
(CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.SIGN_ONLY, CryptoAction.ENCRYPT_AND_SIGN),
26+
(CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.DO_NOTHING, CryptoAction.ENCRYPT_AND_SIGN),
27+
(CryptoAction.SIGN_ONLY, CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.ENCRYPT_AND_SIGN),
28+
(CryptoAction.SIGN_ONLY, CryptoAction.SIGN_ONLY, CryptoAction.SIGN_ONLY),
29+
(CryptoAction.SIGN_ONLY, CryptoAction.DO_NOTHING, CryptoAction.SIGN_ONLY),
30+
(CryptoAction.DO_NOTHING, CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.ENCRYPT_AND_SIGN),
31+
(CryptoAction.DO_NOTHING, CryptoAction.SIGN_ONLY, CryptoAction.SIGN_ONLY),
32+
(CryptoAction.DO_NOTHING, CryptoAction.DO_NOTHING, CryptoAction.DO_NOTHING),
3333
))
3434
def test_item_action_max(left, right, expected):
3535
assert max(left, right) == expected
3636

3737

3838
@pytest.mark.parametrize('left, right, expected', (
39-
(ItemAction.ENCRYPT_AND_SIGN, ItemAction.ENCRYPT_AND_SIGN, ItemAction.ENCRYPT_AND_SIGN),
40-
(ItemAction.ENCRYPT_AND_SIGN, ItemAction.SIGN_ONLY, ItemAction.SIGN_ONLY),
41-
(ItemAction.ENCRYPT_AND_SIGN, ItemAction.DO_NOTHING, ItemAction.DO_NOTHING),
42-
(ItemAction.SIGN_ONLY, ItemAction.ENCRYPT_AND_SIGN, ItemAction.SIGN_ONLY),
43-
(ItemAction.SIGN_ONLY, ItemAction.SIGN_ONLY, ItemAction.SIGN_ONLY),
44-
(ItemAction.SIGN_ONLY, ItemAction.DO_NOTHING, ItemAction.DO_NOTHING),
45-
(ItemAction.DO_NOTHING, ItemAction.ENCRYPT_AND_SIGN, ItemAction.DO_NOTHING),
46-
(ItemAction.DO_NOTHING, ItemAction.SIGN_ONLY, ItemAction.DO_NOTHING),
47-
(ItemAction.DO_NOTHING, ItemAction.DO_NOTHING, ItemAction.DO_NOTHING),
39+
(CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.ENCRYPT_AND_SIGN),
40+
(CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.SIGN_ONLY, CryptoAction.SIGN_ONLY),
41+
(CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.DO_NOTHING, CryptoAction.DO_NOTHING),
42+
(CryptoAction.SIGN_ONLY, CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.SIGN_ONLY),
43+
(CryptoAction.SIGN_ONLY, CryptoAction.SIGN_ONLY, CryptoAction.SIGN_ONLY),
44+
(CryptoAction.SIGN_ONLY, CryptoAction.DO_NOTHING, CryptoAction.DO_NOTHING),
45+
(CryptoAction.DO_NOTHING, CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.DO_NOTHING),
46+
(CryptoAction.DO_NOTHING, CryptoAction.SIGN_ONLY, CryptoAction.DO_NOTHING),
47+
(CryptoAction.DO_NOTHING, CryptoAction.DO_NOTHING, CryptoAction.DO_NOTHING),
4848
))
4949
def test_item_action_min(left, right, expected):
5050
assert min(left, right) == expected
5151

5252

5353
@pytest.mark.parametrize('left, right, expected_comparison', (
54-
(ItemAction.ENCRYPT_AND_SIGN, ItemAction.ENCRYPT_AND_SIGN, operator.eq),
55-
(ItemAction.ENCRYPT_AND_SIGN, ItemAction.SIGN_ONLY, operator.ne),
56-
(ItemAction.ENCRYPT_AND_SIGN, ItemAction.SIGN_ONLY, operator.gt),
57-
(ItemAction.ENCRYPT_AND_SIGN, ItemAction.DO_NOTHING, operator.gt),
58-
(ItemAction.SIGN_ONLY, ItemAction.ENCRYPT_AND_SIGN, operator.lt),
59-
(ItemAction.SIGN_ONLY, ItemAction.SIGN_ONLY, operator.eq),
60-
(ItemAction.SIGN_ONLY, ItemAction.DO_NOTHING, operator.ne),
61-
(ItemAction.SIGN_ONLY, ItemAction.DO_NOTHING, operator.gt),
62-
(ItemAction.DO_NOTHING, ItemAction.ENCRYPT_AND_SIGN, operator.lt),
63-
(ItemAction.DO_NOTHING, ItemAction.SIGN_ONLY, operator.lt),
64-
(ItemAction.DO_NOTHING, ItemAction.DO_NOTHING, operator.eq),
65-
(ItemAction.DO_NOTHING, ItemAction.ENCRYPT_AND_SIGN, operator.ne)
54+
(CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.ENCRYPT_AND_SIGN, operator.eq),
55+
(CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.SIGN_ONLY, operator.ne),
56+
(CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.SIGN_ONLY, operator.gt),
57+
(CryptoAction.ENCRYPT_AND_SIGN, CryptoAction.DO_NOTHING, operator.gt),
58+
(CryptoAction.SIGN_ONLY, CryptoAction.ENCRYPT_AND_SIGN, operator.lt),
59+
(CryptoAction.SIGN_ONLY, CryptoAction.SIGN_ONLY, operator.eq),
60+
(CryptoAction.SIGN_ONLY, CryptoAction.DO_NOTHING, operator.ne),
61+
(CryptoAction.SIGN_ONLY, CryptoAction.DO_NOTHING, operator.gt),
62+
(CryptoAction.DO_NOTHING, CryptoAction.ENCRYPT_AND_SIGN, operator.lt),
63+
(CryptoAction.DO_NOTHING, CryptoAction.SIGN_ONLY, operator.lt),
64+
(CryptoAction.DO_NOTHING, CryptoAction.DO_NOTHING, operator.eq),
65+
(CryptoAction.DO_NOTHING, CryptoAction.ENCRYPT_AND_SIGN, operator.ne)
6666
))
6767
def test_item_action_comp(left, right, expected_comparison):
6868
assert expected_comparison(left, right)

0 commit comments

Comments
 (0)