Skip to content
Merged
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
14 changes: 13 additions & 1 deletion test_team_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@ def test_credit_card(self):


def test_crypto(self):
"""Test CRYPTO functionality"""
# Positive test case
crypto_key = '1BoatSLRHtKNngkdXEeobR76b53LETtpyT' # Valid BTC address Presidio should detect
result = analyze_text(f"My BTC address is {crypto_key}", ['CRYPTO'])
# Check if crypto was detected
self.assertEqual(len(result), 1, 'Should have found 1 CRYPTO so length should be 1')
self.assertEqual(result[0].entity_type, 'CRYPTO', 'CRYPTO entity type is expected')
# Negative test case
result = analyze_text("This is a normal sentence with no keys or sensitive data.", ['CRYPTO'])
self.assertEqual(len(result), 0, 'Should NOT have found any CRYPTO so length should be 0')





def test_date_time(self):
"""Test DATE_TIME functionality"""
Expand Down