[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser/tests - testServerControlView.py:1.1.2.6
Jim Fulton
jim@zope.com
Mon, 10 Jun 2002 15:34:47 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser/tests
In directory cvs.zope.org:/tmp/cvs-serv5490/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser/tests
Modified Files:
Tag: Zope-3x-branch
testServerControlView.py
Log Message:
Implemented
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/IContainerPythonification
Along the way:
- Converted most uses of has_key to use in.
- Fixed a bug in Interface names and namesAndDescriptions methods
that caused base class attributes to be missed.
=== Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser/tests/testServerControlView.py 1.1.2.5 => 1.1.2.6 ===
class Test(PlacefulSetup, TestCase):
- def _TestView__newView(self, container):
- return ServerControlView(container, None)
+ def _TestView__newView(self, container, request):
+ return ServerControlView(container, request)
def test_ServerControlView(self):
getService(None,"Utilities").provideUtility(
IServerControl, ServerControl())
- test_serverctrl = self._TestView__newView(ApplicationController)
- test_shutdown = {'shutdown': 1}
- test_restart = {'restart': 1}
+ test_serverctrl = self._TestView__newView(
+ ApplicationController,
+ {'shutdown': 1},
+ )
+ test_serverctrl.action()
- # Testing shutdown and restart is somewhat tricky ;), we only want to
- # see that the methods return None as we specified that they may not
- # return anything.
-
- # XXX May actual 'correct' implementations break this test as it tries
- # to restart zope ???
- test_serverctrl.action(REQUEST=test_shutdown)
- test_serverctrl.action(REQUEST=test_restart)
+ test_serverctrl = self._TestView__newView(
+ ApplicationController,
+ {'restart': 1},
+ )
+ test_serverctrl.action()
def test_suite():
return TestSuite((