How to return value from async method in python?

You need to return your values in your run function for them to be available in test:

async def run():
   conn = await asyncpg.connect(db_url)
   values = await conn.fetch('''SELECT ... FROM ... WHERE ...;''')
   await conn.close()
   return values

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)