Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
plone.app.linkintegrity.tests.testDocTests.LinkIntegrityFunctionalTestCase Class Reference

List of all members.

Public Member Functions

def afterSetUp
def getBrowser
def setStatusCode
def disableEventCountHelper

Static Public Attributes

 layer = layer.PloneLinkintegrity

Detailed Description

Definition at line 26 of file testDocTests.py.


Member Function Documentation

create some sample content to test with 

Definition at line 30 of file testDocTests.py.

00030 
00031     def afterSetUp(self):
00032         """ create some sample content to test with """
00033         # HTTPRequest's 'set' function is set to it's original implementation
00034         # at the start of each new test, since otherwise the below monkey
00035         # patch will apply to all remaining tests (and break them);  see
00036         # comment below in 'disableEventCountHelper'
00037         HTTPRequest.set = set_orig

Definition at line 51 of file testDocTests.py.

00051 
00052     def disableEventCountHelper(self):
00053         # so here's yet another monkey patch ;), but only to avoid having
00054         # to change almost all the tests after introducing the setting of
00055         # the helper value in 'folder_delete', which prevents presenting
00056         # the user with multiple confirmation forms;  this patch prevents
00057         # setting the value and is meant to disable this optimization in
00058         # some of the tests written so far, thereby not invalidating them...
00059         def set(self, key, value, set_orig=set_orig):
00060             if key == 'link_integrity_events_to_expect':
00061                 value = 0
00062             set_orig(self, key, value)
00063         HTTPRequest.set = set
00064 

instantiate and return a testbrowser for convenience 

Definition at line 38 of file testDocTests.py.

00038 
00039     def getBrowser(self, loggedIn=False):
00040         """ instantiate and return a testbrowser for convenience """
00041         browser = Browser()
00042         if loggedIn:
00043             user = PloneTestCase.default_user
00044             pwd = PloneTestCase.default_password
00045             browser.addHeader('Authorization', 'Basic %s:%s' % (user, pwd))
00046         return browser

Definition at line 47 of file testDocTests.py.

00047 
00048     def setStatusCode(self, key, value):
00049         from ZPublisher import HTTPResponse
00050         HTTPResponse.status_codes[key.lower()] = value


Member Data Documentation

Definition at line 28 of file testDocTests.py.


The documentation for this class was generated from the following file: