[Zope-Checkins] CVS: Zope/lib/python/ZServer/tests - __init__.py:1.1.2.1 test_config.py:1.1.2.1

Fred L. Drake, Jr. fred@zope.com
Wed, 5 Feb 2003 18:25:43 -0500


Update of /cvs-repository/Zope/lib/python/ZServer/tests
In directory cvs.zope.org:/tmp/cvs-serv16316/tests

Added Files:
      Tag: new-install-branch
	__init__.py test_config.py 
Log Message:
Preliminary schema component for ZServer.

=== Added File Zope/lib/python/ZServer/tests/__init__.py ===
##############################################################################
#
# Copyright (c) 2003 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.
#
##############################################################################

# This file is needed to make this directory a package.


=== Added File Zope/lib/python/ZServer/tests/test_config.py ===
##############################################################################
#
# Copyright (c) 2003 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.
#
##############################################################################

"""Test the ZServer configuration machinery."""

import StringIO
import unittest

import ZConfig
import ZServer


class ZServerConfigurationTestCase(unittest.TestCase):
    schema = None

    def get_schema(self):
        if self.schema is None:
            sio = StringIO.StringIO("""
            <schema>
              <import package='ZServer'/>
              <multisection name='*' type='server' attribute='servers'/>
            </schema>
            """)
            schema = ZConfig.loadSchemaFile(sio)
            ZServerConfigurationTestCase.schema = schema
        return self.schema

    def test_load_schema_component(self):
        self.get_schema()


def test_suite():
    return unittest.makeSuite(ZServerConfigurationTestCase)

if __name__ == "__main__":
    unittest.main(defaultTest="test_suite")