Skip to content

Commit 061ca4b

Browse files
author
Lode Rosseel
committed
Fix docs layout
1 parent 7673814 commit 061ca4b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/database.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ This requires the `pytest-asyncio <https://github.com/pytest-dev/pytest-asyncio>
6969
plugin and marking your tests appropriately.
7070

7171
Requirements
72-
""""""""""""
72+
------------
7373

7474
- Install ``pytest-asyncio``.
7575
- Mark async tests with both ``@pytest.mark.asyncio`` and
@@ -90,7 +90,7 @@ Example (async ORM with transactional rollback per test)::
9090
.. _`async-db-behavior`:
9191

9292
Behavior of ``db`` in async tests
93-
"""""""""""""""""""""""""""""""""
93+
---------------------------------
9494

9595
Tests using ``db`` wrap each test in a transaction and roll that transaction back at the end
9696
(like ``django.test.TestCase``). In Django, transactions are bound to the database
@@ -111,8 +111,9 @@ about sync/async database access if your test uses ``transactional_db``, at the
111111
A flush is generally slower than rolling back a transaction.
112112

113113
.. _`db-thread-safeguards`:
114+
114115
Safeguards against database access from different threads
115-
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
116+
---------------------------------------------------------
116117
When using the database in a test with transaction rollback, you must ensure that
117118
database access is only done from the same thread that the test is running on.
118119

0 commit comments

Comments
 (0)