As I did not find any documentation about mocking psycopg3 async transaction, from async connection pool, I would like to ask how can I do that?
I have managed to mock the new connection from async connection pool, but not the transaction.
async with dal.async_conn_pool.connection() as conn:
async with conn.transaction():
connection_mock = AsyncMock()
connection_mock.transaction = AsyncMock()
redshiftdal_mock.async_conn_pool.connection.return_value = connection_mock
# transaction mock logic ?