Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes
ATContentTypes.tests.atctftestcase.IntegrationTestCase Class Reference
Inheritance diagram for ATContentTypes.tests.atctftestcase.IntegrationTestCase:
Inheritance graph
[legend]
Collaboration diagram for ATContentTypes.tests.atctftestcase.IntegrationTestCase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def setupTestObject
def assertStatusEqual

Public Attributes

 folder_url
 folder_path
 basic_auth
 owner_auth
 error_log
 obj_id
 obj
 obj_url
 obj_path

Static Public Attributes

tuple views = ()

Detailed Description

Definition at line 39 of file atctftestcase.py.


Member Function Documentation

Reimplemented in ATContentTypes.tests.test_attopic.TestATTopicFunctional, ATContentTypes.tests.test_atimage.TestATImageFunctional, and ATContentTypes.tests.test_atfolder.TestATBTreeFolderFunctional.

Definition at line 43 of file atctftestcase.py.

00043 
00044     def afterSetUp(self):
00045         # basic data
00046         self.folder_url = self.folder.absolute_url()
00047         self.folder_path = '/%s' % self.folder.absolute_url(1)
00048         self.basic_auth = '%s:%s' % (default_user, default_password)
00049         self.owner_auth = '%s:%s' % (portal_owner, default_password)
00050 
00051         # error log
00052         from Products.SiteErrorLog.SiteErrorLog import temp_logs
00053         temp_logs = {} # clean up log
00054         self.error_log = self.portal.error_log
00055         self.error_log._ignored_exceptions = ()
00056 
00057         # We want 401 responses, not redirects to a login page
00058         plugins = self.portal.acl_users.plugins
00059         for id in plugins.listPluginIds(IChallengePlugin):
00060             plugins.deactivatePlugin(IChallengePlugin, id)
00061 
00062         # disable portal_factory as it's a nuisance here
00063         self.portal.portal_factory.manage_setPortalFactoryTypes(listOfTypeIds=[])
00064 
00065         # object
00066         self.setupTestObject()

Helper method that uses the error log to output useful debug infos

Definition at line 73 of file atctftestcase.py.

00073 
00074     def assertStatusEqual(self, a, b, msg=''):
00075         """Helper method that uses the error log to output useful debug infos
00076         """
00077         if a != b:
00078             entries = self.error_log.getLogEntries()
00079             if entries:
00080                 msg = entries[0]['tb_text']
00081             else:
00082                 if not msg:
00083                     msg = 'no error log msg available'
00084         self.failUnlessEqual(a, b, msg)
00085 

Here is the caller graph for this function:

Reimplemented in ATContentTypes.tests.atctftestcase.ATCTIntegrationTestCase, and ATContentTypes.tests.test_tool.TestATCTToolFunctional.

Definition at line 67 of file atctftestcase.py.

00067 
00068     def setupTestObject(self):
00069         self.obj_id = 'test_object'
00070         self.obj = None
00071         self.obj_url = self.obj.absolute_url()
00072         self.obj_path = '/%s' % self.obj.absolute_url(1)


Member Data Documentation

Definition at line 47 of file atctftestcase.py.

Definition at line 53 of file atctftestcase.py.

Definition at line 46 of file atctftestcase.py.

Definition at line 45 of file atctftestcase.py.

Definition at line 48 of file atctftestcase.py.


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