teszt állományok áthelyezése és szelektálása
This commit is contained in:
16
tests/archive/check_asset_888.py.old
Normal file
16
tests/archive/check_asset_888.py.old
Normal file
@@ -0,0 +1,16 @@
|
||||
import asyncio
|
||||
from sqlalchemy import select
|
||||
from app.db.session import AsyncSessionLocal
|
||||
from app.models.vehicle.asset import Asset
|
||||
|
||||
async def check():
|
||||
async with AsyncSessionLocal() as db:
|
||||
a = (await db.execute(select(Asset).where(Asset.license_plate == "TEST-888"))).scalar()
|
||||
if a:
|
||||
print("TEST-888 db branch_id:", a.branch_id)
|
||||
print("TEST-888 db catalog_id:", a.catalog_id)
|
||||
a2 = (await db.execute(select(Asset).where(Asset.license_plate == "DRAFT-888"))).scalar()
|
||||
if a2:
|
||||
print("DRAFT-888 db branch_id:", a2.branch_id)
|
||||
|
||||
asyncio.run(check())
|
||||
Reference in New Issue
Block a user