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
15 changes: 15 additions & 0 deletions test_team_aggie_annihilators.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ def test_aba_routing_number(self):

def test_au_abn(self):
"""Test AU_ABN functionality"""
# Positive test case - valid ABN format
abn_text = "The company's ABN is 51824753556"
result = analyze_text(abn_text, ['AU_ABN'])
self.assertEqual(len(result), 1, "Expected one AU_ABN detection")
self.assertEqual(result[0].entity_type, 'AU_ABN')

#Another pocitive case with ABN prefix
abn_text_prefix = "ABN 51824753556 belongs to Example Pty Ltd"
result = analyze_text(abn_text_prefix, ['AU_ABN'])
self.assertEqual(len(result),1, "Expected one AU_ABN detection with prefix")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to check the entity_type here as you did in the first positive test case


# negative test case no ABN present
no_abn_text = "The company registration was successful"
result = analyze_text(no_abn_text, ['AU_ABN'])
self.assertEqual(result, [], "Expected no AU_ABN detection in non-ABN text")

def test_au_acn(self):
"""Test AU_ACN functionality"""
Expand Down