2.1.4
atomic_db_session
There are several options that define how the function will handle
an already open transaction.
current_transaction:
"commit" - commits the open transaction and starts a new one
"rollback" - rolls back the open transaction and starts a new one
"append" - continues using the current transaction and commits it
"raise" - raises an InvalidRequestError
set_test_context
Use auto_close=False if you’re using a test session and transaction
that you close manually elsewhere in your code.
Use auto_close=True if, for example, you want to call a
function in a test that uses a context bypassing the
middleware, and you want all sessions to be closed automatically.