[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/tests - __init__.py:1.1.2.1 testIServerControl.py:1.1.2.1

Philipp von Weitershausen philikon@gmx.net
Wed, 10 Apr 2002 10:41:57 -0400


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

Added Files:
      Tag: Zope-3x-branch
	__init__.py testIServerControl.py 
Log Message:
Added a plugin for ApplicationControl for shutting down and restarting the
server. There is no implementation available yet, though.


=== Added File Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/tests/__init__.py ===



=== Added File Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/tests/testIServerControl.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
##############################################################################
"""

$Id: testIServerControl.py,v 1.1.2.1 2002/04/10 14:41:56 philikon Exp $
"""

from unittest import TestCase, TestSuite, main, makeSuite
from Interface.Verify import verifyObject

from Zope.ComponentArchitecture import getUtility, provideUtility
from Zope.App.OFS.ApplicationControl.ServerControl.IServerControl import IServerControl


#############################################################################
# If your tests change any global registries, then uncomment the
# following import and include CleanUp as a base class of your
# test. It provides a setUp and tearDown that clear global data that
# has registered with the test cleanup framework.  Don't use this
# tests outside the Zope package.

# from Zope.Testing.CleanUp import CleanUp # Base class w registry cleanup

#############################################################################

class BaseTestIServerControl:
    """Base test cases for ServerControllers.

       Subclasses need to define a method, '_Test__new', that
       takes no arguments and that returns a new empty test ServerController.
    """

    ############################################################
    # Interface-driven tests:

    def test_IVerify(self):
        verifyObject(IServerControl, self._Test__new())

class Test(BaseTestIServerControl, TestCase):
    def _Test__new(self):
        from Zope.App.OFS.ApplicationControl.ServerControl.StubServerControl import StubServerControl
        return StubServerControl()

def test_suite():
    return TestSuite((
        makeSuite(Test),
        ))

if __name__=='__main__':
    main(defaultTest='test_suite')