;ς )δHEc@s-dZdkZdkZdkZdkZdkZdklZdkl Z dk l Z dk l Z dklZd„Zdeifd „ƒYZd e fd „ƒYZd fd „ƒYZde fd„ƒYZdeded„Zy)dklZd„e_d„e_Wnej onXdS(s% Common initialization and support classes for zwiki unit tests. Zwiki core and plugin test modules (_tests.py) import everything from here, then they are pretty much ready to go, except for installing whichever zope products they need. (We let each test module install just it's required products so that individual tests may be run more quickly.) what is the reason for using afterSetUp instead of setUp ? XXX various, too many test fixture classes are used in zwiki tests right now: - ZwikiTestCase - PloneTestCase - ZopeTestCase - TestCase N(s ZopeTestCase(s HTTPRequest(s HTTPResponse(s ZWikiPage(sZWikic CsΘdkl}|i|i|i|i|i|i|i |i |i |i |i |ig ƒ|iidddƒ|ii|_|iididƒ|ii|_|_tƒ|_|i_dS(s§ Do common setup for our ZopeTestCase-based unit tests. This is a function so that it can be called by both our ZopeTestCase and PloneTestCases's afterSetUp method. XXX ? WARNING: this sets self.page.request at the beginning of the test. If you replace it with a new one, be sure to set page.request again and not just past REQUEST as an argument to avoid confusing DTML. XXX pardon ? (s PermissionsswikistitlessZWikisTestPageN(sProducts.ZWikis PermissionssselfssetPermissionssAddWikisAddsCommentsEdits ChangeTypesDeletesRatesRenamesReparentsUploadsFTPsfoldersmanage_addFolderswikismanage_addProductsmanage_addZWikiPagesTestPagespspages MockRequestsrequestsREQUEST(sselfs Permissions((s;/mnt/gmirror/ports/www/zope-zwiki/work/ZWiki/testsupport.pys afterSetUps  Os ZwikiTestCasecBstZeZRS(N(s__name__s __module__s afterSetUp(((s;/mnt/gmirror/ports/www/zope-zwiki/work/ZWiki/testsupport.pys ZwikiTestCaseGss MockRequestcBs#tZdZed„Zd„ZRS(sh a mock HTTPRequest object for use in testing. like makerequest without the app dependency cCs…tdtiƒ}h}d|d”scCsdS(Nsen((sselfscontextsdomain((s;/mnt/gmirror/ports/www/zope-zwiki/work/ZWiki/testsupport.pys–s(s__doc__ssyssresunittestsOFSsDateTimesTestings ZopeTestCasesZPublisher.HTTPRequests HTTPRequestsZPublisher.HTTPResponses HTTPResponsesProducts.ZWiki.ZWikiPages ZWikiPagesProductssZWikis afterSetUps ZwikiTestCases MockRequestsMockUsers MockZWikiPagesNonesmockPages@Products.PlacelessTranslationService.PlacelessTranslationServicesPlacelessTranslationServices _getContextsnegotiate_languages ImportError(s HTTPRequests MockZWikiPagesOFSs ZopeTestCasesunittestsZWikisDateTimessyssres ZWikiPagesMockUsersPlacelessTranslationServices afterSetUps HTTPResponses ZwikiTestCasesmockPages MockRequest((s;/mnt/gmirror/ports/www/zope-zwiki/work/ZWiki/testsupport.pys?s&      (