[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Schema/tests - __init__.py:1.1.2.1 testDC.py:1.1.2.1

Martijn Faassen m.faassen@vet.uu.nl
Wed, 10 Apr 2002 12:10:32 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/Schema/tests
In directory cvs.zope.org:/tmp/cvs-serv6926/Zope/App/Schema/tests

Added Files:
      Tag: Zope3-property-branch
	__init__.py testDC.py 
Log Message:
Added experimental schema stuff. Incidentally removed windows newlines from
Formulator


=== Added File Zope3/lib/python/Zope/App/Schema/tests/__init__.py ===



=== Added File Zope3/lib/python/Zope/App/Schema/tests/testDC.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.
# 
##############################################################################
"""

Revision information:
$Id: testDC.py,v 1.1.2.1 2002/04/10 16:10:31 faassen Exp $
"""

from unittest import TestCase, TestSuite, main, makeSuite
from Zope.App.Schema.DC import DC

#############################################################################
# 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 Test(TestCase):
    def test(self):
        adapter = DC({})
        self.assertEquals('', adapter.title)
        self.assertEquals('', adapter.description)
        adapter.title = 'title'
        adapter.description = 'description'
        self.assertEquals('title', adapter.title)
        self.assertEquals('description', adapter.description)

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

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