[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser/tests - testServerControlView.py:1.1.2.2

Christian Theune ct@gocept.com
Thu, 18 Apr 2002 16:03:14 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv31265/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser/tests

Modified Files:
      Tag: Zope-3x-branch
	testServerControlView.py 
Log Message:
- Removed the StubServerControl

- Added the ServerControl which implements a full server control (without the actual
    shutdown/restarting capabilities, as those are factored out to hookable methods,
    and we need to discuss how the shutdown will happen exactly - some asyncore rewriting
    is planned AFAIK)

- updated unit tests



=== Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser/tests/testServerControlView.py 1.1.2.1 => 1.1.2.2 ===
 from Zope.App.OFS.ApplicationControl.ServerControl.IServerControl import IServerControl
 from Zope.App.OFS.ApplicationControl.ServerControl.Views.Browser.ServerControlView import ServerControlView
-from Zope.App.OFS.ApplicationControl.ServerControl.StubServerControl import StubServerControl
+from Zope.App.OFS.ApplicationControl.ServerControl.ServerControl import ServerControl
 from Zope.ComponentArchitecture import provideUtility
 
 class Test(TestCase):
@@ -26,7 +26,7 @@
         return ServerControlView(container)
 
     def test_ServerControlView(self):
-        provideUtility(IServerControl, StubServerControl())
+        provideUtility(IServerControl, ServerControl())
         test_serverctrl = self._TestView__newView(ApplicationController)
 
         test_shutdown = {'shutdown': 1}
@@ -38,8 +38,8 @@
 
         # XXX May actual 'correct' implementations break this test as it tries
         # to restart zope ???
-        self.assertEqual(test_serverctrl.action(REQUEST=test_shutdown), None)
-        self.assertEqual(test_serverctrl.action(REQUEST=test_restart), None)
+        test_serverctrl.action(REQUEST=test_shutdown)
+        test_serverctrl.action(REQUEST=test_restart)
        
 def test_suite():
     return TestSuite((