2.1 KiB
2.1 KiB
Local Testing Guide
This guide helps you test the Email Alerts Application locally.
🚀 Quick Start
Option 1: Use the automated script
./run_local.sh
Option 2: Manual setup
# Activate virtual environment
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Start the server
python run_server.py
🌐 Access the Application
Once the server is running, you can access:
- Dashboard: http://localhost:5237/
- Settings: http://localhost:5237/settings
🧪 Testing the Connection
Step 1: Configure Credentials
- Go to http://localhost:5237/settings
- Enter the Zoho credentials:
- Email:
projects@manaknightdigital.com - Password:
4o%!sbk$(3!>@#567!!
- Email:
- Click "Save Settings"
Step 2: Test Connection
- Click "Test Connection" button
- You should see: "Connection successful! Found X emails in the last 7 days."
🔧 Troubleshooting
If you get "days_back" error:
- The server is running old code
- Restart the server:
Ctrl+Cthen run./run_local.shagain
If you get "ModuleNotFoundError":
- Make sure you're using the virtual environment:
source venv/bin/activate
If port 5237 is in use:
- The script will automatically kill existing processes
- Or manually:
pkill -f "python.*run_server.py"
📋 Test Checklist
- Server starts without errors
- Web interface loads at http://localhost:5237/
- Settings page loads at http://localhost:5237/settings
- Can enter Zoho credentials
- "Test Connection" works without "days_back" error
- Connection shows "successful" message
🎯 Expected Results
✅ Success: "Connection successful! Found X emails in the last 7 days." ❌ Old Error: "Connection failed: ZohoClient.fetch_emails() got an unexpected keyword argument 'days_back'"
🛑 Stopping the Server
Press Ctrl+C in the terminal where the server is running.
📁 Files for Testing
run_local.sh- Automated local startup scripttest_local_connection.py- Connection test scriptzoho_client.py- Fixed with days_back parameterconfig.json- Clean configuration (no hardcoded credentials)