[Neo-report] r1857 vincent - /trunk/neo/tests/client/testClientApp.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Feb 24 16:59:20 CET 2010
Author: vincent
Date: Wed Feb 24 16:59:19 2010
New Revision: 1857
Log:
Fix test to follow changes introduced in r1856.
Modified:
trunk/neo/tests/client/testClientApp.py
Modified: trunk/neo/tests/client/testClientApp.py
==============================================================================
--- trunk/neo/tests/client/testClientApp.py [iso-8859-1] (original)
+++ trunk/neo/tests/client/testClientApp.py [iso-8859-1] Wed Feb 24 16:59:19 2010
@@ -192,14 +192,21 @@
mq = app.mq_cache
oid = self.makeOID()
tid = self.makeTID()
- # cache cleared -> result from ZODB
+ # cache cleared
self.assertTrue(oid not in mq)
app.pt = Mock({ 'getCellListForOID': (), })
app.local_var.history = (oid, [(tid, 0)])
+ # If object len is 0, this object doesn't exist anymore because its
+ # creation has been undone.
+ self.assertRaises(KeyError, app.getSerial, oid)
+ self.assertEquals(len(app.pt.mockGetNamedCalls('getCellListForOID')), 1)
+ # Otherwise, result from ZODB
+ app.pt = Mock({ 'getCellListForOID': (), })
+ app.local_var.history = (oid, [(tid, 1)])
self.assertEquals(app.getSerial(oid), tid)
self.assertEquals(len(app.pt.mockGetNamedCalls('getCellListForOID')), 1)
# fill the cache -> hit
- mq.store(oid, (tid, ''))
+ mq.store(oid, (tid, ' '))
self.assertTrue(oid in mq)
app.pt = Mock({ 'getCellListForOID': (), })
app.getSerial(oid)
More information about the Neo-report
mailing list