Back to index

plone3  3.1.7
Public Member Functions
kss.core.tests.test_browserview.TestBrowserView Class Reference
Inheritance diagram for kss.core.tests.test_browserview.TestBrowserView:
Inheritance graph
Collaboration diagram for kss.core.tests.test_browserview.TestBrowserView:
Collaboration graph

List of all members.

Public Member Functions

def test_attach_error

Detailed Description

Definition at line 21 of file

Member Function Documentation

Definition at line 23 of file

00024     def test_attach_error(self):
00025         'Test if errors are attached properly'
00026         # just render any page
00027         context = self.folder
00028         view = context.restrictedTraverse('@@kss_view')
00029         self.assert_(view is not None)
00030         view.attach_error(err_type='TheError', err_value='the_<>message\n\n')
00031         response = view.request.response
00032         header = response.getHeader('x-ksscommands')
00033         self.assert_('the_&amp;lt;&amp;gt;message' in header)   # no < > in the message
00034         self.assert_('\n' not in header)   # no /n in the payload: would destroy the page
00035         self.assertEqual(header, '<?xml version="1.0"?> <kukit xmlns=""> <commands> \t<command name="error"> \t\t<param name="type">system</param> \t\t<param name="message">TheError: the_&amp;lt;&amp;gt;message  </param> \t</command> </commands> </kukit> ')

Here is the call graph for this function:

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