Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Nov 22, 2023
1 parent 6d89782 commit 480b011
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_data_safety_tools.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""Tests for data_safety_tools.py."""


from wipac_dev_tools import data_safety_tools


def test_00() -> None:
"""Test with usual values."""
senstives = ["my_token", "AUTHOR", "secretive_number", "YouShallNotPass"]

unimportant_value = "12345"

for name in ["foo", "bar", "baz"] + senstives:
print(name)
actual = data_safety_tools.obfuscate_value_if_sensitive(name, unimportant_value)
print(actual)
if name in senstives:
assert actual == "***"
else:
assert actual == unimportant_value

0 comments on commit 480b011

Please sign in to comment.