- Categorized scripts into tests/unit/, tests/integration/, tests/e2e/, and tests/tools/. - Adopted consistent naming prefixes (test_unit_*, test_int_*, test_e2e_*, tool_*). - Renamed conftest_mock.py to mock_config_helper.py for clarity. - Updated test_int_boot_diagnosis.py with sys.path setup for root-level execution.
30 lines
649 B
Python
30 lines
649 B
Python
import sys
|
|
import os
|
|
import logging
|
|
|
|
# Add current directory to path
|
|
sys.path.append(os.getcwd())
|
|
|
|
# Configure logging
|
|
logging.basicConfig(level=logging.DEBUG)
|
|
|
|
try:
|
|
from app.lib_email import send_email
|
|
print("Successfully imported send_email.")
|
|
|
|
print("Running send_email in TEST mode...")
|
|
result = send_email(
|
|
from_email="test@example.com",
|
|
to_email="test@example.com",
|
|
subject="Test Email",
|
|
body_html="<p>Test</p>",
|
|
test=True
|
|
)
|
|
|
|
print(f"Result: {result}")
|
|
|
|
except Exception as e:
|
|
print(f"Error during email test: {e}")
|
|
import traceback
|
|
traceback.print_exc()
|