Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
kss.core.tests.commandinspector.CommandInspectorView Class Reference

List of all members.

Public Member Functions

def __init__
def render

Public Attributes

 context
 request

Detailed Description

Inspector view of a command.

This enables debugging checks. Returns commands
as a list of dicts.

Look at the tests to see what checks this makes possible.

Definition at line 21 of file commandinspector.py.


Constructor & Destructor Documentation

def kss.core.tests.commandinspector.CommandInspectorView.__init__ (   self,
  context,
  request 
)

Definition at line 31 of file commandinspector.py.

00031 
00032     def __init__(self, context, request):
00033         self.context = context
00034         self.request = request
00035 
00036         # Force parameters content to be unicode
00037         for command in context:
00038             for param in command.getParams():
00039                 param.force_content_unicode()
    

Here is the caller graph for this function:


Member Function Documentation

Definition at line 40 of file commandinspector.py.

00040 
00041     def render(self):
00042         result = []
00043         for command in self.context:
00044             d = dict(command.__dict__)
00045             # params are converted to a dict from a list.
00046             # Also get rid of "none" params that were only a hack for xml
00047             d['params'] = dict([(param.name, param.content) for param in d['params'] if param.name != 'none'])
00048             result.append(d)
00049         return result

Here is the call graph for this function:


Member Data Documentation

Definition at line 32 of file commandinspector.py.

Definition at line 33 of file commandinspector.py.


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