Back to index

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

List of all members.

Public Member Functions

def setupTestObject
def test_zmi_tabs
def afterSetUp
def assertStatusEqual

Public Attributes

 obj_id
 obj
 obj_url
 obj_path
 folder_url
 folder_path
 basic_auth
 owner_auth
 error_log

Static Public Attributes

tuple zmi_tabs = ('manage_imageScales', 'manage_overview', )
tuple views = ()

Detailed Description

Definition at line 62 of file test_tool.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()

def ATContentTypes.tests.atctftestcase.IntegrationTestCase.assertStatusEqual (   self,
  a,
  b,
  msg = '' 
) [inherited]
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 from ATContentTypes.tests.atctftestcase.IntegrationTestCase.

Definition at line 66 of file test_tool.py.

00066 
00067     def setupTestObject(self):
00068         self.obj_id = TOOLNAME
00069         self.obj = getToolByName(self.portal, TOOLNAME)
00070         self.obj_url = self.obj.absolute_url()
00071         self.obj_path = '/%s' % self.obj.absolute_url(1)

Definition at line 72 of file test_tool.py.

00072 
00073     def test_zmi_tabs(self):
00074         for view in self.zmi_tabs:
00075             response = self.publish('%s/%s' % (self.obj_path, view), self.owner_auth)
00076             self.assertStatusEqual(response.getStatus(), 200, 
00077                 "%s: %s" % (view, response.getStatus())) # OK
00078 
00079 tests.append(TestATCTToolFunctional)

Here is the call graph for this function:


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.

Reimplemented from ATContentTypes.tests.atctftestcase.IntegrationTestCase.

Definition at line 68 of file test_tool.py.

Reimplemented from ATContentTypes.tests.atctftestcase.IntegrationTestCase.

Definition at line 67 of file test_tool.py.

Reimplemented from ATContentTypes.tests.atctftestcase.IntegrationTestCase.

Definition at line 70 of file test_tool.py.

Reimplemented from ATContentTypes.tests.atctftestcase.IntegrationTestCase.

Definition at line 69 of file test_tool.py.

Definition at line 48 of file atctftestcase.py.

tuple ATContentTypes.tests.test_tool.TestATCTToolFunctional.zmi_tabs = ('manage_imageScales', 'manage_overview', ) [static]

Definition at line 64 of file test_tool.py.


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