Releases: krylosov-aa/context-async-sqlalchemy
2.1.5
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.
2.0.4
2.0.3
I removed modules from the init that not everyone needs
2.0.2
only doc fixes
2.0.0
lots of improvements
1.2.3
easier middleware installation
1.2.2
The library provides several ready-made utils that can be used in tests,
for example in fixtures. It helps write tests that share a common transaction
between the test and the application, so data isolation between tests is
achieved through fast transaction rollback.
You can see the capabilities in the examples:
Here are tests with a common transaction between the
application and the tests.