aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2025-02-11 13:23:19 +0000
committerAlex Schofield <git@ajschof.me>2025-02-11 13:23:19 +0000
commit689e43b4ba5e88faccbef9b0f7f3e45a4d519744 (patch)
tree487d961f1cf319392303b8bf0843f360fd9af0b5
parente6bedc5c9d391b761fec6529de8537a991125c26 (diff)
downloadgdpr-obfuscator-689e43b4ba5e88faccbef9b0f7f3e45a4d519744.tar.gz
gdpr-obfuscator-689e43b4ba5e88faccbef9b0f7f3e45a4d519744.zip
add initial tests for csv_reader
-rw-r--r--Pipfile12
-rw-r--r--pytest.ini2
-rw-r--r--src/csv_reader.py2
-rw-r--r--test/test_csv_reader.py35
4 files changed, 51 insertions, 0 deletions
diff --git a/Pipfile b/Pipfile
new file mode 100644
index 0000000..e915499
--- /dev/null
+++ b/Pipfile
@@ -0,0 +1,12 @@
+[[source]]
+url = "https://pypi.org/simple"
+verify_ssl = true
+name = "pypi"
+
+[packages]
+
+[dev-packages]
+pytest = "*"
+
+[requires]
+python_version = "3.13"
diff --git a/pytest.ini b/pytest.ini
new file mode 100644
index 0000000..ad5c7cc
--- /dev/null
+++ b/pytest.ini
@@ -0,0 +1,2 @@
+[pytest]
+pythonpath = . src
diff --git a/src/csv_reader.py b/src/csv_reader.py
new file mode 100644
index 0000000..2556db6
--- /dev/null
+++ b/src/csv_reader.py
@@ -0,0 +1,2 @@
+def csv_reader():
+ pass
diff --git a/test/test_csv_reader.py b/test/test_csv_reader.py
new file mode 100644
index 0000000..f16a229
--- /dev/null
+++ b/test/test_csv_reader.py
@@ -0,0 +1,35 @@
+# csv_reader.py - tests
+# Author: Alex Schofield
+
+from csv_reader import csv_reader
+
+def test_empty_csv_should_return_no_content():
+ pass
+
+def test_csv_with_header_only_should_return_no_content():
+ pass
+
+def test_csv_with_valid_data_should_return_obfuscated_content():
+ pass
+
+def test_csv_with_quoted_fields_should_be_sanitised():
+ pass
+
+def test_non_csv_file_should_return_no_content():
+ pass
+
+def test_csv_file_with_embedded_newline_should_be_sanitised():
+ pass
+
+def test_csv_file_with_embedded_comma_should_be_sanitised():
+ pass
+
+def test_csv_file_with_embedded_quote_should_be_sanitised():
+ pass
+
+def test_csv_file_with_null_values_should_be_transformed_to_empty_string():
+ pass
+
+def test_csv_file_with_non_string_data_should_be_transformed_to_empty_string():
+ pass
+
git.ajschof.me — hosted by ajschofield — powered by cgit