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
7 changes: 7 additions & 0 deletions test_team_technigals.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ def test_detect_usernames(self):
# Test an invalid organization
invalid_result = analyze_text('John Smith')
self.assertNotIn("USERNAME", str(invalid_result), "Invalid organization incorrectly detected")

# Test a potential false positive
potential_false_positive_result = analyze_text('@legitimate_org')
username_occurrences = str(potential_false_positive_result).count("USERNAME")

# Check for false positives (adjust the threshold as needed)
self.assertEqual(username_occurrences, 1, "False positive username detection")

def test_zipcode(self):
"""Test to find zipcode of user"""
Expand Down