- 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.
21 lines
624 B
Python
21 lines
624 B
Python
#!/usr/bin/env python3
|
|
import asyncio
|
|
import sys
|
|
sys.path.insert(0, '/Users/christianthomas/DEV/bmc_hub_dev')
|
|
from app.services.vtiger_service import VTigerService
|
|
|
|
async def test_accounts():
|
|
vtiger = VTigerService()
|
|
|
|
# Check what 3x760 and 3x811 are in vTiger
|
|
for vtiger_id in ['3x760', '3x811']:
|
|
query = f"SELECT id, accountname FROM Accounts WHERE id = '{vtiger_id}';"
|
|
result = await vtiger.query(query)
|
|
|
|
if result:
|
|
print(f"{vtiger_id} = {result[0].get('accountname')}")
|
|
else:
|
|
print(f"{vtiger_id} = NOT FOUND")
|
|
|
|
asyncio.run(test_accounts())
|