File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,11 @@ async def set_test_context(auto_close: bool = False) -> AsyncGenerator[None]:
3333 Opens a context similar to middleware.
3434
3535 Use auto_close=False if you’re using a test session and transaction
36- that you close manually elsewhere in your code.
36+ that you close elsewhere in your code.
3737
38- Use auto_close=True if, for example, you want to call a
39- function in a test that uses a context bypassing the
40- middleware , and you want all sessions to be closed automatically.
38+ Use auto_close=True if you want to call a function
39+ in a test that uses a context while the middleware is not
40+ active , and you want all sessions to be closed automatically.
4141 """
4242 token = init_db_session_ctx ()
4343 try :
Original file line number Diff line number Diff line change @@ -394,10 +394,10 @@ <h3 id="set_test_context">set_test_context</h3>
394394It’s intended for use in tests where the test and the application share
395395a single transaction.</ p >
396396< p > Use < code > auto_close=False</ code > if you’re using a test session and transaction
397- that you close manually elsewhere in your code.</ p >
398- < p > Use < code > auto_close=True</ code > if, for example, you want to call a
399- function in a test that uses a context bypassing the
400- middleware , and you want all sessions to be closed automatically.</ p >
397+ that you close elsewhere in your code.</ p >
398+ < p > Use < code > auto_close=True</ code > if you want to call a function
399+ in a test that uses a context while the middleware is not
400+ active , and you want all sessions to be closed automatically.</ p >
401401< hr />
402402< h3 id ="put_savepoint_session_in_ctx "> put_savepoint_session_in_ctx</ h3 >
403403< pre > < code class ="language-python "> async def put_savepoint_session_in_ctx(
Original file line number Diff line number Diff line change @@ -325,11 +325,11 @@ It’s intended for use in tests where the test and the application share
325325a single transaction.
326326
327327Use ` auto_close=False ` if you’re using a test session and transaction
328- that you close manually elsewhere in your code.
328+ that you close elsewhere in your code.
329329
330- Use ` auto_close=True ` if, for example, you want to call a
331- function in a test that uses a context bypassing the
332- middleware , and you want all sessions to be closed automatically.
330+ Use ` auto_close=True ` if you want to call a function
331+ in a test that uses a context while the middleware is not
332+ active , and you want all sessions to be closed automatically.
333333
334334---
335335
You can’t perform that action at this time.
0 commit comments