bmc_hub/test_vtiger_accounts.py

21 lines
624 B
Python
Raw Permalink Normal View History

#!/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())