Skip to content

Commit 3fff7fc

Browse files
committed
plugin: add docstring to DjangoDbBlocker.restore()
1 parent 1ff6679 commit 3fff7fc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pytest_django/plugin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,11 @@ def block(self) -> ContextManager[None]:
845845
return _DatabaseBlockerContextManager(self)
846846

847847
def restore(self) -> None:
848+
"""Undo a previous call to block() or unblock().
849+
850+
Consider using block() and unblock() as context managers instead of
851+
manually calling restore().
852+
"""
848853
self._dj_db_wrapper.ensure_connection = self._history.pop()
849854

850855

0 commit comments

Comments
 (0)