diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py index 8af5c1e0..669e7841 100644 --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -845,6 +845,11 @@ def block(self) -> ContextManager[None]: return _DatabaseBlockerContextManager(self) def restore(self) -> None: + """Undo a previous call to block() or unblock(). + + Consider using block() and unblock() as context managers instead of + manually calling restore(). + """ self._dj_db_wrapper.ensure_connection = self._history.pop()