[Zodb-checkins] CVS: ZODB/src/persistent/tests -
test_overriding_attrs.py:1.6
Jeremy Hylton
jeremy at zope.com
Fri Apr 16 11:58:42 EDT 2004
Update of /cvs-repository/ZODB/src/persistent/tests
In directory cvs.zope.org:/tmp/cvs-serv11088/src/persistent/tests
Modified Files:
test_overriding_attrs.py
Log Message:
Replace use of builtin get_transaction() with explicit transaction module.
=== ZODB/src/persistent/tests/test_overriding_attrs.py 1.5 => 1.6 ===
--- ZODB/src/persistent/tests/test_overriding_attrs.py:1.5 Thu Mar 4 17:41:59 2004
+++ ZODB/src/persistent/tests/test_overriding_attrs.py Fri Apr 16 11:58:10 2004
@@ -20,10 +20,7 @@
"""
from persistent import Persistent
-try:
- from transaction import get_transaction
-except ImportError:
- pass # else assume ZODB will install it as a builtin
+import transaction
from ZODB.tests.util import DB
class SampleOverridingGetattr(Persistent):
@@ -58,7 +55,7 @@
>>> db = DB()
>>> conn = db.open()
>>> conn.root()['o'] = o
- >>> get_transaction().commit()
+ >>> transaction.commit()
>>> o._p_deactivate()
>>> o._p_changed
@@ -124,7 +121,7 @@
>>> db = DB()
>>> conn = db.open()
>>> conn.root()['o'] = o
- >>> get_transaction().commit()
+ >>> transaction.commit()
>>> o._p_deactivate()
>>> o._p_changed
@@ -229,7 +226,7 @@
>>> db = DB()
>>> conn = db.open()
>>> conn.root()['o'] = o
- >>> get_transaction().commit()
+ >>> transaction.commit()
>>> o._p_deactivate()
>>> o._p_changed
@@ -247,7 +244,7 @@
Now, if commit:
- >>> get_transaction().commit()
+ >>> transaction.commit()
>>> o._p_changed
0
@@ -329,7 +326,7 @@
>>> db = DB()
>>> conn = db.open()
>>> conn.root()['o'] = o
- >>> get_transaction().commit()
+ >>> transaction.commit()
>>> o._p_deactivate()
>>> o._p_changed
@@ -352,7 +349,7 @@
Now, if commit:
- >>> get_transaction().commit()
+ >>> transaction.commit()
>>> o._p_changed
0
More information about the Zodb-checkins
mailing list