From 9116ba65e3451c055408b869fbb2ee5623c6ba7b Mon Sep 17 00:00:00 2001 From: Seshu Brahma Date: Mon, 29 Jan 2024 12:18:09 -0800 Subject: [PATCH] trying to fix pytest --- tests/e2e/data_masking/test_e2e_data_masking.py | 2 +- tests/functional/data_masking/test_aws_encryption_sdk.py | 6 ++++-- tests/unit/data_masking/test_unit_data_masking.py | 3 +-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/e2e/data_masking/test_e2e_data_masking.py b/tests/e2e/data_masking/test_e2e_data_masking.py index 9689de13885..6fd67109507 100644 --- a/tests/e2e/data_masking/test_e2e_data_masking.py +++ b/tests/e2e/data_masking/test_e2e_data_masking.py @@ -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 diff --git a/tests/functional/data_masking/test_aws_encryption_sdk.py b/tests/functional/data_masking/test_aws_encryption_sdk.py index cda6437f67f..f1386465591 100644 --- a/tests/functional/data_masking/test_aws_encryption_sdk.py +++ b/tests/functional/data_masking/test_aws_encryption_sdk.py @@ -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 @@ -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( @@ -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( @@ -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( @@ -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 \ No newline at end of file + assert decrypted_data == data diff --git a/tests/unit/data_masking/test_unit_data_masking.py b/tests/unit/data_masking/test_unit_data_masking.py index e519706ce26..0d29a4c1781 100644 --- a/tests/unit/data_masking/test_unit_data_masking.py +++ b/tests/unit/data_masking/test_unit_data_masking.py @@ -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: @@ -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 == {