mò 0á¸Ec@sŠdZdkZdkZdkZdkZdkZdkZdkZdk l Z d„Z d„Z dei eiefd„ƒYZdS(sITestCase for Zope testing $Id: base.py 66219 2006-03-27 01:29:34Z shh $ N(snoSecurityManagercCs,tiƒ}ti|ƒ}ti|ƒ|S(s3Opens a ZODB connection and returns the app object.N(tZope2tapptutilst makerequestt connectionstregister(R((t8/data/zmath/zope/lib/python/Testing/ZopeTestCase/base.pyRs   cCsti|ƒdS(s!Closes the app's ZODB connection.N(RtcloseR(R((RR%stTestCasecBs’tZdZeieiifZd„Zd„Z d„Z d„Z d„Z d„Z d„Zd„Zd „Zd d „Zd „Zd „ZRS(s$Base test case for Zope testing cCsdS(sbCalled after setUp() has completed. This is far and away the most useful hook. N((tself((Rt afterSetUp2scCsdS(syCalled before tearDown() is executed. Note that tearDown() is not called if setUp() fails. N((R ((RtbeforeTearDown8scCsdS(sƒCalled after the fixture has been cleared. Note that this may occur during setUp() *and* tearDown(). N((R ((Rt afterClear?scCstiƒdS(s‰Called before the ZODB connection is opened, at the start of setUp(). By default begins a new transaction. N(t transactiontbegin(R ((Rt beforeSetUpFscCstiƒdS(sˆCalled before the ZODB connection is closed, at the end of tearDown(). By default aborts the transaction. N(R tabort(R ((Rt beforeCloseMscCsLy1|iƒ|iƒ|_|iƒ|iƒWn|iƒ‚nXdS(sPSets up the fixture. Do not override, use the hooks instead. N(R Rt_appRt_setupR t_clear(R ((RtsetUpTs   cCs6y|iƒ|idƒWn|iƒ‚nXdS(sSTears down the fixture. Do not override, use the hooks instead. iN(R R R(R ((RttearDownas  cCstƒS(s"Returns the app object for a test.N(R(R ((RRlscCsdS(sHSets up the fixture. Framework authors may override. N((R ((RRpsicCs7|o|iƒn|iƒ|iƒ|iƒdS(sClears the fixture.N(tcall_close_hookR Rt_closetlogoutR (R R((RRvs   cCstiƒtiƒdS(sCloses the ZODB connection.N(R RRtcloseAll(R ((RR~s cCs tƒdS(s Logs out.N(tnoSecurityManager(R ((RRƒs(t__name__t __module__t__doc__t interfacest IZopeTestCasetprofilertProfiledt__implements__R R R RRRRRRRRR(((RR+s          (RtZopeLiteRtunittestR R!RRRt AccessControl.SecurityManagementRRRR"Rtobject( RRRRR!RR RRR%R((Rt?s