Back to index

plone3  3.1.7
Classes | Public Member Functions | Public Attributes | Static Public Attributes
kss.demo.tests.test_demoview.KSSDemoTestCase Class Reference
Inheritance diagram for kss.demo.tests.test_demoview.KSSDemoTestCase:
Inheritance graph
[legend]
Collaboration diagram for kss.demo.tests.test_demoview.KSSDemoTestCase:
Collaboration graph
[legend]

List of all members.

Classes

class  layer

Public Member Functions

def afterSetUp
def test_instantiation
def test_getDivContent
def loadCoreConfig
def createView
def setDebugRequest

Public Attributes

 view

Static Public Attributes

 layer = KSSLayer

Detailed Description

Definition at line 34 of file test_demoview.py.


Member Function Documentation

Definition at line 42 of file test_demoview.py.

00042 
00043     def afterSetUp(self):
00044         KSSViewTestCase.afterSetUp(self)
00045         self.setDebugRequest()
00046         self.folder._setObject('demo', SimpleContent('Demo', 'Demo'))
00047         self.view = self.folder.demo.restrictedTraverse('getDivContent')

Here is the call graph for this function:

Definition at line 108 of file base.py.

00108 
00109     def createView(self):
00110         "Set up a fake view (with no content)"
00111         self.view = self.folder.restrictedTraverse('testMethod')
00112         return self.view

Here is the caller graph for this function:

def kss.core.tests.base.KSSViewTestCaseMixin.loadCoreConfig (   self,
  kss_core = True 
) [inherited]

Definition at line 102 of file base.py.

00102 
00103     def loadCoreConfig(self, kss_core=True):
00104         warnings.warn(
00105             "KSS tests are now using layers.  Please do not use "
00106             "loadCoreConfig anymore.",
00107             DeprecationWarning)
    

Definition at line 113 of file base.py.

00113 
00114     def setDebugRequest(self):
00115         'commands will be rendered as test friendly data structures'
00116         request = self.folder.REQUEST
00117         interface.directlyProvides(
00118             request,
00119             interface.directlyProvidedBy(request) + IDebugRequest)

Here is the caller graph for this function:

Definition at line 55 of file test_demoview.py.

00055 
00056     def test_getDivContent(self):
00057         view = self.view
00058         commands = view.getCommands()
00059         res = view.getDivContent()
00060         self.assertEquals(res, [
00061             {'selectorType': '', 'params': {
00062                     'html': u'<![CDATA[<h1>it worked</h1>]]>',
00063                     'withKssSetup': u'True',
00064                 }, 'name': 'replaceInnerHTML', 'selector': 'div#demo'}, 
00065             {'selectorType': '', 'params': {
00066                     'html': u'<![CDATA[<h1 id="workedagain">it worked&#160;again</h1>]]>',
00067                     'withKssSetup': u'True',
00068                 }, 'name': 'replaceInnerHTML', 'selector': 'div#demo'},
00069             ])

Definition at line 48 of file test_demoview.py.

00048 
00049     def test_instantiation(self):
00050         view = self.view
00051         commands = view.getCommands()
00052         self.assertNotEquals(view, None)


Member Data Documentation

kss.core.tests.base.KSSViewTestCase.layer = KSSLayer [static, inherited]

Definition at line 121 of file base.py.

Reimplemented from kss.core.tests.base.KSSViewTestCaseMixin.

Definition at line 46 of file test_demoview.py.


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