aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2025-02-26 16:37:27 +0000
committerAlex Schofield <git@ajschof.me>2025-02-26 16:37:27 +0000
commit1e836b7b23fbe87252423d279920f370884b3196 (patch)
tree37284a286bb03e1d685e3669087c93b3896cd389 /test
parent499d75a03e7653d4f2f1e47c88cec3938cd1cfe4 (diff)
downloadgdpr-obfuscator-1e836b7b23fbe87252423d279920f370884b3196.tar.gz
gdpr-obfuscator-1e836b7b23fbe87252423d279920f370884b3196.zip
update test_core.py to use json string as input
Diffstat (limited to 'test')
-rw-r--r--test/test_core.py5
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
git.ajschof.me — hosted by ajschofield — powered by cgit