Back to index

plone3  3.1.7
Functions | Variables
PlonePAS.tests.test_doctests Namespace Reference

Functions

def exception
def setBody
def _traceback
def test_suite

Variables

 orig_exception = HTTPResponse.exception
 orig_setBody = HTTPResponse.setBody

Function Documentation

def PlonePAS.tests.test_doctests._traceback (   self,
  t,
  v,
  tb,
  as_html = 1 
) [private]

Definition at line 47 of file test_doctests.py.

00047 
00048 def _traceback(self, t, v, tb, as_html=1):
00049     return ''.join(format_exception(t, v, tb, as_html=as_html))
00050 
00051 HTTPResponse._error_format = 'text/plain'
00052 HTTPResponse._traceback = _traceback
00053 HTTPResponse.exception = exception
00054 HTTPResponse.setBody = setBody

def PlonePAS.tests.test_doctests.exception (   self,
  kw 
)

Definition at line 33 of file test_doctests.py.

00033 
00034 def exception(self, **kw):
00035     def tag_search(*args):
00036         return False
00037     kw['tag_search'] = tag_search
00038     return orig_exception(self, **kw)

def PlonePAS.tests.test_doctests.setBody (   self,
  args,
  kw 
)

Definition at line 40 of file test_doctests.py.

00040 
00041 def setBody(self, *args, **kw):
00042     kw['is_error'] = 0
00043     if len(args[0]) == 2:
00044         title, body = args[0]
00045         args = (body,) + args[1:]
00046     return orig_setBody(self, *args, **kw)

Definition at line 55 of file test_doctests.py.

00055 
00056 def test_suite():
00057     suite = unittest.TestSuite()
00058     DocFileSuite = ZopeTestCase.FunctionalDocFileSuite
00059     tests = (
00060         ('cookie_auth.txt', FunctionalTestCase),
00061         )
00062 
00063     for fname, klass in tests:
00064         t = DocFileSuite(fname,
00065                          test_class=klass,
00066                          package='Products.PlonePAS.tests')
00067         suite.addTest(t)
00068     return suite
00069 

Variable Documentation

Definition at line 32 of file test_doctests.py.

Definition at line 39 of file test_doctests.py.