Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test_team_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ def test_us_bank_number(self):

def test_es_nif(self):
"""Test es_nif functionality"""
#Negative Testcase Should not replace id
test_string = "documento nacional de identidad B112345267A8A"
expected = "documento nacional de identidad B112345267A8A"
self.assertEqual(expected, anonymize_text(test_string, ['ES_NIF']))
# positive testcase should replace id$ python pii_scan.py > results.txt
test_string = 'documento nacional de identidad 55555555K'
expected = 'documento nacional de identidad <ES_NIF>'
actual = anonymize_text(test_string, ['ES_NIF'])
self.assertEqual(expected, actual)

def test_it_identity_card(self):
"""Test it_identity_card functionality"""
Expand Down