accounting/test/open_account.py
2024-09-22 12:05:37 +08:00

32 lines
773 B
Python

from run_test import run
from appPublic.log import debug
from sqlor.dbpools import DBPools
from accounting.openaccount import openAllCustomerAccounts, \
openOwnerAccounts, openAllProviderAccounts, openAllResellerAccounts
import test_rf
async def OpenAccount():
orgid = '_VaV5trl8faujgr7xaE3D'
db = DBPools()
async with db.sqlorContext('sage') as sor:
try:
await openAllCustomerAccounts(sor, orgid)
except Exception as e:
debug(f'{e}')
try:
await openOwnerAccounts(sor, orgid)
except Exception as e:
debug(f'{e}')
try:
await openAllProviderAccounts(sor, orgid)
except Exception as e:
debug(f'{e}')
try:
await openAllResellerAccounts(sor, orgid)
except Exception as e:
debug(f'{e}')
if __name__ == '__main__':
run(OpenAccount)