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
18 changes: 16 additions & 2 deletions test_team_futureassured.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import unittest
from pii_scan import anonymize_text


class TestTeamFutureAssured(unittest.TestCase):
"""Test the Team TeamFutureAssured PII functions"""
def test_anonymize_text(self):
Expand Down Expand Up @@ -78,8 +77,23 @@ def test_it_driver_license(self):
expected = 'My driver license code is R1053121X'
actual = anonymize_text(test_string, ['IT_DRIVER_LICENSE'])
self.assertEqual(expected, actual)

def test_au_abn(self):
"""Test au_abn functionality"""
"""Test case for AU_ABN"""
#positive testcase
test_string = "My ABN is 51824753556"
expected = "My ABN is <AU_ABN>"
actual = anonymize_text(test_string, ["AU_ABN"])
self.assertEqual(expected,actual)

#negative testcase
test_string = "My ABN is 1234334345678"
expected = "My ABN is <AU_ABN>"
actual = anonymize_text(test_string, ["AU_ABN"])
self.assertNotEqual(expected,actual)




def test_au_medicare(self):
"""Test au_medicare functionality"""
Expand Down