aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2025-02-19 03:22:26 +0000
committerAlex Schofield <git@ajschof.me>2025-02-19 03:22:26 +0000
commit3c4b66e8490c6fdf93fb8fee735d52c76eb2853b (patch)
tree67f3d2c401b4b0e77d18f259ba2d788f1fcfcd84 /test
parentef05a027ffbf8bbee89bb031ccd6152de49762c6 (diff)
downloadgdpr-obfuscator-3c4b66e8490c6fdf93fb8fee735d52c76eb2853b.tar.gz
gdpr-obfuscator-3c4b66e8490c6fdf93fb8fee735d52c76eb2853b.zip
remove annoying comments for better readability of code
Diffstat (limited to 'test')
-rw-r--r--test/test_csv_reader.py23
-rw-r--r--test/test_obfuscator.py15
2 files changed, 0 insertions, 38 deletions
diff --git a/test/test_csv_reader.py b/test/test_csv_reader.py
index e4c135b..0206542 100644
--- a/test/test_csv_reader.py
+++ b/test/test_csv_reader.py
@@ -1,6 +1,3 @@
-# csv_reader.py - tests for read_string and read_s3
-# Author: Alex Schofield
-
import boto3
from moto import mock_aws
from obfuscator.csv_reader import CSVReader
@@ -8,11 +5,6 @@ import pytest
reader = CSVReader()
-# CSVREADER: READ_STRING TESTS
-
-# Check if the function can read a CSV string with no content and return
-# an empty list
-
def test_empty_csv_should_return_no_content():
content = ""
@@ -21,10 +13,6 @@ def test_empty_csv_should_return_no_content():
assert result == expected
-# Check if the function can read a CSV string with only a header and return
-# an empty list
-
-
def test_csv_with_header_only_should_return_no_content():
content = "student_id,name,course\n"
result = reader.read_string(content)
@@ -32,10 +20,6 @@ def test_csv_with_header_only_should_return_no_content():
assert result == expected
-# Check if the function can read a CSV string with valid data and return
-# a list of dictionaries
-
-
def test_csv_with_valid_data():
content = (
"student_id,name,course\n"
@@ -50,10 +34,6 @@ def test_csv_with_valid_data():
assert result == expected
-# Check if the function can read a CSV string with quoted fields and return
-# a list of dictionaries with the quoted fields intact
-
-
def test_csv_with_quoted_fields_should_run_as_expected():
content = (
"student_id,name,course\n"
@@ -68,9 +48,6 @@ def test_csv_with_quoted_fields_should_run_as_expected():
assert result == expected
-# CSVREADER: READ_S3 TESTS
-
-
def setup_s3(s3_client, bucket: str, key: str, content: str):
s3_client.create_bucket(
Bucket=bucket,
diff --git a/test/test_obfuscator.py b/test/test_obfuscator.py
index 4f61b16..c77b6b4 100644
--- a/test/test_obfuscator.py
+++ b/test/test_obfuscator.py
@@ -1,8 +1,5 @@
from obfuscator.obfuscate import obfuscate
-# Check if the function does what its supposed to and can obfuscate
-# valid PII fields in a list of dictionaries
-
def test_obfuscate_data_with_valid_pii_fields():
data = [
@@ -39,11 +36,6 @@ def test_obfuscate_data_with_valid_pii_fields():
assert result == expected
-# Check if the function can obfuscate data even when some PII
-# fields are missing from some of the data, returning a list of dictionaries
-# but with the missing PII fields obfuscated and the rest of the data intact
-
-
def test_obfuscate_data_with_missing_pii_field():
data = [
{"student_id": "1234", "name": "John Smith", "course": "Software"},
@@ -69,9 +61,6 @@ def test_obfuscate_data_with_missing_pii_field():
assert result == expected
-# Check if the function can handle an empty list of data, returning an empty list
-
-
def test_obfuscate_data_with_no_data():
data = []
pii_fields = ["name", "email_address"]
@@ -81,10 +70,6 @@ def test_obfuscate_data_with_no_data():
assert result == expected
-# Check if the function can handle an empty list of PII fields, returning the data as is
-# without mutating it
-
-
def test_obfuscate_data_with_empty_pii_fields():
data = [
{
git.ajschof.me — hosted by ajschofield — powered by cgit