bmc_hub/keepforlater/test_subscription_processing.py
Christian a604a3cc44 Add comprehensive test suite for vTiger integration and ticket module
- Implemented test scripts for vTiger account retrieval, contact data, and modules.
- Created a detailed test suite for the ticket module, covering database schema validation, ticket number generation, prepaid card constraints, and service logic.
- Added tests for vTiger field inspection and various queries related to accounts and sales orders.
- Introduced SQL migration scripts for the ALSO Cloud Billing foundation, including import jobs, lines, and mapping tables with necessary constraints and indices.
- Enhanced workflow columns in the import lines table to support matching and validation timestamps.
2026-06-20 03:29:51 +02:00

32 lines
731 B
Python

#!/usr/bin/env python3
"""
Test script for subscription invoice processing
Run this manually to test the subscription processing job
"""
import asyncio
import sys
import os
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from app.core.database import init_db
from app.jobs.process_subscriptions import process_subscriptions
async def main():
"""Run subscription processing test"""
print("🧪 Testing subscription invoice processing...")
print("=" * 60)
# Initialize database connection pool
init_db()
print("✅ Database initialized")
await process_subscriptions()
print("=" * 60)
print("✅ Test complete")
if __name__ == "__main__":
asyncio.run(main())