diff options
| author | Alex Schofield <git@ajschof.me> | 2025-02-26 16:37:27 +0000 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2025-02-26 16:37:27 +0000 |
| commit | 1e836b7b23fbe87252423d279920f370884b3196 (patch) | |
| tree | 37284a286bb03e1d685e3669087c93b3896cd389 | |
| parent | 499d75a03e7653d4f2f1e47c88cec3938cd1cfe4 (diff) | |
| download | gdpr-obfuscator-1e836b7b23fbe87252423d279920f370884b3196.tar.gz gdpr-obfuscator-1e836b7b23fbe87252423d279920f370884b3196.zip | |
update test_core.py to use json string as input
| -rw-r--r-- | test/test_core.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_core.py b/test/test_core.py index f60f4d2..ad2a2a6 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -4,6 +4,7 @@ from moto import mock_aws import boto3 import csv import random +import json obfuscator = Obfuscator() @@ -40,7 +41,9 @@ def test_main_integration(): path = f"s3://{bucket}/{key}" - result = obfuscator.process_s3(path, ["name"]) + json_input = json.dumps({"file_path": path, "pii_fields": ["name"]}) + + result = obfuscator.process_s3(json_input) result_str = result.decode("utf-8") assert rand_name not in result_str |
