summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/build/orm/session_transaction.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/build/orm/session_transaction.rst b/doc/build/orm/session_transaction.rst
index 24a844650..08f11afcc 100644
--- a/doc/build/orm/session_transaction.rst
+++ b/doc/build/orm/session_transaction.rst
@@ -484,7 +484,9 @@ everything is rolled back.
from sqlalchemy import event
+
class SomeTest(TestCase):
+
def setUp(self):
# connect to the database
self.connection = engine.connect()
@@ -503,6 +505,6 @@ everything is rolled back.
def restart_savepoint(session, transaction):
if transaction.nested and not transaction._parent.nested:
session.begin_nested()
-
+ session.expire_all()
# ... the tearDown() method stays the same