Skip to content

Commit

Permalink
trying to fix pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
seshubaws committed Jan 29, 2024
1 parent fbdcfd1 commit 9116ba6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/data_masking/test_e2e_data_masking.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
)
from tests.e2e.utils import data_fetcher

pytest.skip(reason="Data masking tests disabled until we go GA.", allow_module_level=True) #???
pytest.skip(reason="Data masking tests disabled until we go GA.", allow_module_level=True) # ???


@pytest.fixture
Expand Down
6 changes: 4 additions & 2 deletions tests/functional/data_masking/test_aws_encryption_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from typing import Any, Callable

import pytest

from aws_encryption_sdk.identifiers import Algorithm

from aws_lambda_powertools.utilities.data_masking import DataMasking
Expand Down Expand Up @@ -323,6 +322,7 @@ def test_encrypt_json_with_tuple_fields(data_masker):
# THEN the result is only the specified fields are masked
assert decrypted_data == data


def test_encrypt_with_encryption_context(data_masker):
# GIVEN the data type is a json representation of a dictionary with a list inside
data = json.dumps(
Expand Down Expand Up @@ -379,6 +379,7 @@ def test_encrypt_with_complex_dict(data_masker):
# THEN the result is only the specified fields are masked
assert decrypted_data == data


def test_encrypt_with_slice(data_masker):
# GIVEN the data type is a json representation of a dictionary with a list inside
data = json.dumps(
Expand Down Expand Up @@ -454,6 +455,7 @@ def test_encrypt_with_complex_search(data_masker):
# THEN the result is only the specified fields are masked
assert decrypted_data == data


def test_encrypt_with_provider_options(data_masker):
# GIVEN the data type is a json representation of a dictionary with a list inside
data = json.dumps(
Expand All @@ -471,4 +473,4 @@ def test_encrypt_with_provider_options(data_masker):
decrypted_data = data_masker.decrypt(encrypted_data)

# THEN the result is only the specified fields are masked
assert decrypted_data == data
assert decrypted_data == data
3 changes: 1 addition & 2 deletions tests/unit/data_masking/test_unit_data_masking.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
DataMaskingUnsupportedTypeError,
)

pytest.skip(reason="Data masking tests disabled until we go GA.", allow_module_level=True) #???

@pytest.fixture
def data_masker() -> DataMasking:
Expand Down Expand Up @@ -103,7 +102,7 @@ def test_mask_dict_with_fields(data_masker):

# WHEN mask is called with a list of fields specified
masked_string = data_masker.erase(data, fields=["a.'1'.None", "a..'4'"])
print('masked_string:', masked_string)
print("masked_string:", masked_string)

# THEN the result is only the specified fields are masked
assert masked_string == {
Expand Down

0 comments on commit 9116ba6

Please sign in to comment.