Back to index

plone3  3.1.7
Classes | Functions
kss.core.tests.test_kssview_functional Namespace Reference

Classes

class  TestKSSView

Functions

def objectModifiedThruKSSView
def setUp
def tearDown
def ftest_kssview
def test_suite

Function Documentation

Let's verify that a KSSView actually is the current site when it's
being traversed to.  Also, let's make sure that if in the course
of this view, an object event is fired, the view will dispatch to
KSS-specific subscribers:

  >>> from Products.Five.testbrowser import Browser
  >>> browser = Browser('http://localhost:8080/testkssview')
  >>> print browser.contents
  I'm the current site.
  I have the current site manager.
  Event subscriber was here.

Definition at line 65 of file test_kssview_functional.py.

00065 
00066 def ftest_kssview():
00067     """
00068     Let's verify that a KSSView actually is the current site when it's
00069     being traversed to.  Also, let's make sure that if in the course
00070     of this view, an object event is fired, the view will dispatch to
00071     KSS-specific subscribers:
00072     
00073       >>> from Products.Five.testbrowser import Browser
00074       >>> browser = Browser('http://localhost:8080/testkssview')
00075       >>> print browser.contents
00076       I'm the current site.
00077       I have the current site manager.
00078       Event subscriber was here.
00079     """

Definition at line 41 of file test_kssview_functional.py.

00041 
00042 def objectModifiedThruKSSView(obj, view, event):
00043     view.messages.append("Event subscriber was here.")

Definition at line 44 of file test_kssview_functional.py.

00044 
00045 def setUp(test=None):
00046     configure_zcml = '''\
00047     <configure
00048          xmlns="http://namespaces.zope.org/zope"
00049          xmlns:browser="http://namespaces.zope.org/browser"
00050          package="kss.core.tests.test_kssview_functional">
00051       <browser:page
00052           for="*"
00053           name="testkssview"
00054           class=".TestKSSView"
00055           permission="zope.Public"
00056           />
00057       <subscriber handler=".objectModifiedThruKSSView" />
00058     </configure>'''
00059     zcml.load_config('configure.zcml', Products.Five)
00060     zcml.load_string(configure_zcml)
00061     setHooks()

Definition at line 62 of file test_kssview_functional.py.

00062 
00063 def tearDown(test=None):
00064     cleanUp()

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 80 of file test_kssview_functional.py.

00080 
00081 def test_suite():
00082     return unittest.TestSuite([
00083         FunctionalDocTestSuite(setUp=setUp, tearDown=tearDown),
00084         ])