-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_test.py
More file actions
46 lines (40 loc) · 1.39 KB
/
Copy pathbuild_test.py
File metadata and controls
46 lines (40 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python
"""Build and test verification script"""
import sys
import os
sys.path.insert(0, os.getcwd())
print("=" * 60)
print("LOAN PAYMENT MANAGER - BUILD & TEST VERIFICATION")
print("=" * 60)
# Check all modules can be imported
print("\n✓ Testing module imports...")
try:
from src.payment import CreditCardLoanPayment, PersonalLoanPayment, HomeLoanPayment, AutoLoanPayment
from src.bank_linking import BankLink
from src.utils import validate_email, validate_phone, format_currency
from src.api.app import create_app
from src.models.db import init_db
print("✓ All core modules imported successfully")
except Exception as e:
print(f"✗ Import error: {e}")
sys.exit(1)
# Test Flask app creation
print("\n✓ Testing Flask app creation...")
try:
app = create_app()
print("✓ Flask app created successfully")
except Exception as e:
print(f"✗ Flask app creation failed: {e}")
# Test some validators
print("\n✓ Testing validators...")
results = {
'Email validation': validate_email('test@example.com'),
'Phone validation (USA)': validate_phone('+1-202-555-0173'),
'Phone validation (Canada)': validate_phone('+1-416-555-0100'),
}
for test, result in results.items():
status = '✓' if result else '✗'
print(f"{status} {test}: {result}")
print("\n" + "=" * 60)
print("✓ All build and integration checks passed!")
print("=" * 60)