mò 0á¸Ec@s¢dZdkZdkZdkZdkZdkZdfd„ƒYZdfd„ƒYZddd„Z dk l Z e e dƒpe i e _e e _ ndS( sTSupport for ZODB sandboxes in ZTC $Id: sandbox.py 30326 2005-05-11 16:03:21Z shh $ Nt SandboxedcBs tZdZd„Zd„ZRS(s©Derive from this class and an xTestCase to make each test run in its own ZODB sandbox:: class MyTest(Sandboxed, ZopeTestCase): ... cCsKtitiƒiƒƒ}tƒi|ƒti|ƒ}ti |ƒ|S(s"Returns the app object for a test.N( tZope2tapptsandboxtopent AppZappertsettutilst makerequestt connectionstregister(tselfR((t;/data/zmath/zope/lib/python/Testing/ZopeTestCase/sandbox.pyt_app!s  cCs%tƒiƒtiƒtiƒdS(s)Clears the transaction and the AppZapper.N(Rtcleart transactiontabortR tcloseAll(R ((R t_close)s  (t__name__t __module__t__doc__R R(((R Rs  RcBsAtZdZhdes( RRRRRRRRR(((R R0s    cCs4tƒiƒ}|dj o|Sn|i||ƒS(s6Makes ZPublisher.publish() use the current app object.N(RRRR t__old_bobo_traverse__tREQUESTtname(R RRR((R t__bobo_traverse__Bs  (sZApplicationWrapperR(RtZopeLiteRRtbaseRR RRRRtApp.ZApplicationtZApplicationWrapperthasattrR( RRRRR!RR RR((R t?s