[KSS-checkins] r38195 - kukit/kss.core/branch/philikon-cleanup/kss/core/tests

philikon at codespeak.net philikon at codespeak.net
Thu Feb 8 19:51:53 CET 2007


Author: philikon
Date: Thu Feb  8 19:51:45 2007
New Revision: 38195

Modified:
   kukit/kss.core/branch/philikon-cleanup/kss/core/tests/test_ttwapi.py
Log:
Fix TTW API test case by adding more setup code.


Modified: kukit/kss.core/branch/philikon-cleanup/kss/core/tests/test_ttwapi.py
==============================================================================
--- kukit/kss.core/branch/philikon-cleanup/kss/core/tests/test_ttwapi.py	(original)
+++ kukit/kss.core/branch/philikon-cleanup/kss/core/tests/test_ttwapi.py	Thu Feb  8 19:51:45 2007
@@ -6,18 +6,21 @@
 from AccessControl import allow_module
 allow_module('kss.core.tests.help_ttwapi')
 
-import Products.Five
+import Products.Five.component
 from Products.Five import zcml
 
 from zope import event, component
 from zope.lifecycleevent import ObjectModifiedEvent
+from zope.app.component.hooks import setHooks
 
 from kss.core import KSSView
 from kss.core.tests.base import KssViewTestCase
 
 class TTWTestCase(KssViewTestCase):
+
     def afterSetUp(self):
         KssViewTestCase.afterSetUp(self)
+        setHooks()
         self.app.manage_addProduct['PythonScripts'].manage_addPythonScript(
             'kss_test')
         self.setDebugRequest()
@@ -79,7 +82,7 @@
 return renderKSSCommands(view)
 '''
         self.app.kss_test.ZPythonScript_edit('', pythonScriptCode)
-        result = self.app.kss_test() 
+        result = self.app.kss_test()
         self.assertEquals(len(result), 2)
         command = result[0]
         self.assertEquals(command['selector'], '#test')
@@ -90,7 +93,8 @@
 
 @component.adapter(None, KSSView, ObjectModifiedEvent)
 def objectModifiedThruKSSView(obj, view, event):
-    view.getCommandSet('core').replaceInnerHTML("#event", "Event subscriber was here.")
+    view.getCommandSet('core').replaceInnerHTML(
+        "#event", "Event subscriber was here.")
 
 def test_suite():
     suites = []


More information about the Kukit-checkins mailing list